Skip to content

Commit 6e5d9b8

Browse files
tianleiwuankitm3k
authored andcommitted
[CUDA] Build nhwc ops by default (microsoft#22648)
### Description * Build cuda nhwc ops by default. * Deprecate `--enable_cuda_nhwc_ops` in build.py and add `--disable_cuda_nhwc_ops` option Note that it requires cuDNN 9.x. If you build with cuDNN 8, NHWC ops will be disabled automatically. ### Motivation and Context In general, NHWC is faster than NCHW for convolution in Nvidia GPUs with Tensor Cores, and this could improve performance for vision models. This is the first step to prefer NHWC for CUDA in 1.21 release. Next step is to do some tests on popular vision models. If it help in most models and devices, set `prefer_nhwc=1` as default cuda provider option.
1 parent 6731c0a commit 6e5d9b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: tools/ci_build/github/azure-pipelines/bigmodels-ci-pipeline.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ stages:
123123
--parallel \
124124
--build_wheel \
125125
--enable_onnx_tests --use_cuda --cuda_version=11.8 --cuda_home=/usr/local/cuda-11.8 --cudnn_home=/usr/local/cuda-11.8 \
126-
--enable_cuda_profiling --enable_cuda_nhwc_ops \
126+
--enable_cuda_profiling \
127127
--enable_pybind --build_java \
128128
--use_cache \
129129
--cmake_extra_defines 'CMAKE_CUDA_ARCHITECTURES=75;86' ; \

0 commit comments

Comments
 (0)