File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -603,7 +603,7 @@ struct ConvParams {
603603 // nInputPlane and nInputPlane == nOutputPlane (the latter due to the lack of
604604 // a depthwise multiplier)
605605 bool is_depthwise (const at::Tensor& input, const at::Tensor& weight) const {
606- return input.is_cuda () &&
606+ return ( input.is_cuda () || input. is_xpu () ) &&
607607 !transposed &&
608608 (input.ndimension () == 4 || input.ndimension () == 5 ) &&
609609 at::symint::size<T>(input, 1 ) == groups &&
@@ -1219,6 +1219,12 @@ ConvBackend _select_conv_backend(
12191219 return ConvBackend::Cudnn;
12201220 } else if (params.use_miopen (input, weight, bias_sizes_opt.has_value ())) {
12211221 return ConvBackend::MiopenDepthwise;
1222+ } else if (params.use_mkldnn (input, weight)) {
1223+ if (params.transposed ) {
1224+ return ConvBackend::MkldnnTranspose;
1225+ } else {
1226+ return ConvBackend::Mkldnn;
1227+ }
12221228 } else {
12231229 if (input.ndimension () == 4 ) {
12241230 return ConvBackend::CudaDepthwise2d;
You can’t perform that action at this time.
0 commit comments