tqchen commented on a change in pull request #7083:
URL: https://github.com/apache/tvm/pull/7083#discussion_r545434253



##########
File path: src/relay/op/random/kernel.cc
##########
@@ -25,21 +25,23 @@ namespace relay {
 
 TVM_REGISTER_NODE_TYPE(ThreefryGenerateAttrs);
 
+static const TensorType THREEFRY_KEY_TYPE = TensorType({10}, 
tvm::DataType::UInt(64));

Review comment:
       As a rule of thumb, try to avoid static variables. Use static functions 
that returns these variables instead. As the construction is not that costly. 
As sometimes they have static variable constructing order issues

##########
File path: src/relay/op/random/kernel.cc
##########
@@ -25,21 +25,23 @@ namespace relay {
 
 TVM_REGISTER_NODE_TYPE(ThreefryGenerateAttrs);
 
+static const TensorType THREEFRY_KEY_TYPE = TensorType({10}, 
tvm::DataType::UInt(64));

Review comment:
       As a rule of thumb, try to avoid static variables. As sometimes they 
have static variable constructing order issues Use static functions that 
returns these variables instead. As the construction is not that costly. 




----------------------------------------------------------------
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:
[email protected]


Reply via email to