Skip to content

Commit 7c49cfb

Browse files
author
Peter Yeh
committed
rename to n_group
1 parent 292e95d commit 7c49cfb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/contrib/miopen/conv_forward.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,15 @@ TVM_REGISTER_GLOBAL("tvm.contrib.miopen.conv2d.setup")
5656
MIOpenThreadEntry* entry_ptr = MIOpenThreadEntry::ThreadLocal();
5757
// assertion for group count;
5858
assert(n_group > 0 && "Group Size > 0 is expected");
59-
if(n_group>1)
60-
mode = 2;
59+
if(n_group > 1)
60+
assert(mode > 1 && "Group /Depthwise Conv mode when num of groups > 1");
6161
// Set Mode
6262
entry_ptr->conv_entry.mode = static_cast<miopenConvolutionMode_t>(mode);
6363
// Set Ctx
6464
entry_ptr->conv_entry.ctx = TVMContext{kDLROCM, 0};
6565
// Set Data Type
6666
entry_ptr->conv_entry.data_type = static_cast<miopenDataType_t>(
67-
dtype); // MIOpen supports fp32(miopenFloat), fp16(miopenHalf) at
67+
dtype); // MIOpen supports fp32(miopenFloat), fp16(miopenHalf), int32, int8 at
6868
// this moment.
6969
// Set Desc
7070
MIOPEN_CALL(miopenInitConvolutionDescriptor(entry_ptr->conv_entry.conv_desc,
@@ -81,7 +81,7 @@ TVM_REGISTER_GLOBAL("tvm.contrib.miopen.conv2d.setup")
8181
MIOPEN_CALL(miopenSet4dTensorDescriptor(entry_ptr->conv_entry.filter_desc,
8282
entry_ptr->conv_entry.data_type,
8383
w_dim0,
84-
w_dim1/group,
84+
w_dim1/n_group,
8585
w_dim2,
8686
w_dim3));
8787
// Set Input

0 commit comments

Comments
 (0)