zhuzilin commented on a change in pull request #8041:
URL: https://github.com/apache/tvm/pull/8041#discussion_r634155870
##########
File path: python/tvm/relay/op/strategy/generic.py
##########
@@ -1495,6 +1495,28 @@ def threefry_split_strategy(attrs, inputs, out_type,
target):
return strategy
+# uniform
+def wrap_compute_uniform(topi_compute):
+ """Wrap uniform topi compute"""
+
+ def _compute_uniform(attrs, inputs, _):
+ return list(topi_compute(inputs[0], inputs[1], inputs[2],
attrs.out_shape, attrs.out_dtype))
+
+ return _compute_uniform
+
+
+@override_native_generic_func("uniform_strategy")
+def uniform_strategy(attrs, inputs, out_type, target):
+ """uniform generic strategy"""
+ strategy = _op.OpStrategy()
+ strategy.add_implementation(
+ wrap_compute_uniform(topi.random.uniform),
+ wrap_topi_schedule(topi.generic.schedule_extern),
Review comment:
As for me, the main goal for now is to add the missing bits to support
the training, so I'm not so sure about the performance... I think we could
gradually do the optimization after we have a complete workflow for training~
--
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]