Open jimgao1 opened 1 week ago
Hi @jimgao1 ,
Thanks for your question.
A graph like
int64_t group_count = 2;
auto X = graph->tensor(fe::graph::Tensor_attributes()
.set_name("image")
.set_dim({n, c, h, w})
.set_stride({c * h * w, 1, c * w, c}));
auto W = graph->tensor(fe::graph::Tensor_attributes()
.set_name("filter")
.set_dim({k, c/group_count, r, s})
.set_stride({c/group_count * r * s, 1, c/group_count * s, c/group_count}));
auto conv_options =
fe::graph::Conv_fprop_attributes().set_padding({0, 0}).set_stride({1, 1}).set_dilation({1, 1});
auto Y = graph->conv_fprop(X, W, conv_options);
can be used to set the group count.
It is inferred based on the X and W sizes. Hope this helps
Thanks, Anerudhan
While in cuDNN's
cudnnConvolutionForward()
there is thegroupCount
option for grouped convolutions, is there such an API available in the cuDNN frontend for theconv_fprop
,conv_wgrad
andconv_dgrad
operations?