junrushao1994 commented on a change in pull request #8817:
URL: https://github.com/apache/tvm/pull/8817#discussion_r694380529



##########
File path: src/tir/schedule/concrete_schedule.cc
##########
@@ -208,6 +211,25 @@ Schedule ConcreteScheduleNode::Copy() const {
   }
 
 /******** Schedule: Schedule: Sampling ********/
+
+void ConcreteScheduleNode::Seed(support::LinearCongruentialEngine::TRandState 
seed) {
+  support::LinearCongruentialEngine(&rand_state_).Seed(seed == -1 ? 
std::random_device()() : seed);

Review comment:
       don't need to make the logic so compact though, we can do like:
   
   ```C++
     if (seed == -1) {
       seed = std::random_device()();
     }
     support::LinearCongruentialEngine(&rand_state_).Seed(seed);
   ```




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to