optima2005 commented on a change in pull request #4604: [FRONTEND][TF] Add
conv3d
URL: https://github.com/apache/incubator-tvm/pull/4604#discussion_r364114059
##########
File path: topi/python/topi/cuda/conv3d.py
##########
@@ -134,3 +139,37 @@ def _callback(op):
traverse_inline(s, outs[0].op, _callback)
return s
+
+
[email protected]_topi_schedule(generic.schedule_conv3d_ndhwc, ["cuda", "gpu"],
+ ["direct"])
+def schedule_conv3d_ndhwc_cuda(cfg, outs):
+ """TOPI schedule callback of conv3d for cuda gpu
+
+ Parameters
+ ----------
+ cfg: ConfigEntity
+ The config for this template
+
+ outs: Array of Tensor
+ The computation graph description of conv2d
+ in the format of an array of tensors.
+
+ Returns
+ -------
+ s: Schedule
+ The computation schedule for conv2d.
+ """
+ target = tvm.target.current_target()
+ if 'cudnn' in target.libs:
+ return generic.schedule_extern(outs)
+
+ outs = [outs] if isinstance(outs, tvm.tensor.Tensor) else outs
+ s = tvm.create_schedule([x.op for x in outs])
+
+ def _callback(op):
+ if op.tag == 'conv3d_ndhwc':
+ schedule_direct_3d_cuda(cfg, s, op.output(0))
Review comment:
@icemelon9 You are correct. I made a mistake here. Sorry about that.
Just like NHWC for conv2d, The NDHWC layout conv3d won't be supported for
cuda. So the schedule won't be needed. I would remove it by raising a new PR.
----------------------------------------------------------------
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]
With regards,
Apache Git Services