gromero commented on a change in pull request #7266:
URL: https://github.com/apache/tvm/pull/7266#discussion_r560563123



##########
File path: tests/micro/qemu/zephyr-runtime/src/main.c
##########
@@ -161,6 +162,27 @@ tvm_crt_error_t TVMPlatformTimerStop(double* 
elapsed_time_seconds) {
   return kTvmErrorNoError;
 }
 
+tvm_crt_error_t TVMPlatformGenerateRandom(uint8_t* buffer, size_t num_bytes) {
+  uint32_t random;  // one unit of random data.
+
+  // Fill parts of `buffer` which are as large as `random`.
+  size_t num_full_blocks = num_bytes / sizeof(random);
+  for (int i = 0; i < num_full_blocks; ++i) {
+    random = sys_rand32_get();
+    memcpy(&buffer[i * sizeof(random)], &random, sizeof(random));
+  }
+
+  // Fill any leftover tail which is smaller than `random.

Review comment:
       It's missing a closing single quote closing  after ` random`




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to