cudnn-frontend icon indicating copy to clipboard operation
cudnn-frontend copied to clipboard

Windows build error

Open tianleiwu opened this issue 11 months ago • 3 comments

include\cudnn_frontend\graph_interface.h(444,19): Error C2248: 'cudnn_frontend::graph::Layernorm_attributes::forward_phase': cannot access private member declared in class 'cudnn_frontend::graph::Layernorm_attributes'

tianleiwu avatar Mar 01 '24 23:03 tianleiwu

Hi @tianleiwu thanks for reporting this.

Would you happen to know which MSVC compiler you are using? We do not observe this in our internal CI.

Also, confirming this is on the 1.1.2 release, right?


Edit: It looks obvious that we are using a protected member. Knowing the MSVC version, will help us repro this issue and fix for other attributes as well.

Thanks

Anerudhan avatar Mar 02 '24 06:03 Anerudhan

Yes, it is on 1.1.2 release. MSVC version is 19.37.32825.0.

An example failed build: https://github.com/microsoft/onnxruntime/actions/runs/8118954587/job/22194111719?pr=19470


fused_conv.cc D:\b\Debug_deps\cudnn_frontend-src\include\cudnn_frontend/graph_interface.h(444,19): error C2248: 'cudnn_frontend::graph::Layernorm_attributes::forward_phase': cannot access private member declared in class 'cudnn_frontend::graph::Layernorm_attributes' [D:\b\Debug\onnxruntime_providers_cuda.vcxproj] D:\b\Debug_deps\cudnn_frontend-src\include\cudnn_frontend\graph_properties.h(741,20): note: see declaration of 'cudnn_frontend::graph::Layernorm_attributes::forward_phase' D:\b\Debug_deps\cudnn_frontend-src\include\cudnn_frontend\graph_properties.h(736,7): note: see declaration of 'cudnn_frontend::graph::Layernorm_attributes' D:\b\Debug_deps\cudnn_frontend-src\include\cudnn_frontend/graph_interface.h(468,19): error C2248: 'cudnn_frontend::graph::Instancenorm_attributes::forward_phase': cannot access private member declared in class 'cudnn_frontend::graph::Instancenorm_attributes' [D:\b\Debug\onnxruntime_providers_cuda.vcxproj] D:\b\Debug_deps\cudnn_frontend-src\include\cudnn_frontend\graph_properties.h(768,20): note: see declaration of 'cudnn_frontend::graph::Instancenorm_attributes::forward_phase' D:\b\Debug_deps\cudnn_frontend-src\include\cudnn_frontend\graph_properties.h(763,7): note: see declaration of 'cudnn_frontend::graph::Instancenorm_attributes' D:\b\Debug_deps\cudnn_frontend-src\include\cudnn_frontend/graph_interface.h(711,19): error C2248: 'cudnn_frontend::graph::Rmsnorm_attributes::forward_phase': cannot access private member declared in class 'cudnn_frontend::graph::Rmsnorm_attributes' [D:\b\Debug\onnxruntime_providers_cuda.vcxproj] D:\b\Debug_deps\cudnn_frontend-src\include\cudnn_frontend\graph_properties.h(991,20): note: see declaration of 'cudnn_frontend::graph::Rmsnorm_attributes::forward_phase' D:\b\Debug_deps\cudnn_frontend-src\include\cudnn_frontend\graph_properties.h(986,7): note: see declaration of 'cudnn_frontend::graph::Rmsnorm_attributes' D:\b\Debug_deps\cudnn_frontend-src\include\cudnn_frontend/graph_interface.h(736,19): error C2248: 'cudnn_frontend::graph::Rmsnorm_backward_attributes::use_dbias': cannot access private member declared in class 'cudnn_frontend::graph::Rmsnorm_backward_attributes' [D:\b\Debug\onnxruntime_providers_cuda.vcxproj] D:\b\Debug_deps\cudnn_frontend-src\include\cudnn_frontend\graph_properties.h(1024,25): note: see declaration of 'cudnn_frontend::graph::Rmsnorm_backward_attributes::use_dbias' D:\b\Debug_deps\cudnn_frontend-src\include\cudnn_frontend\graph_properties.h(1019,7): note: see declaration of 'cudnn_frontend::graph::Rmsnorm_backward_attributes' D:\b\Debug_deps\cudnn_frontend-src\include\cudnn_frontend/graph_interface.h(780,19): error C2248: 'cudnn_frontend::graph::SDPA_attributes::is_inference': cannot access private member declared in class 'cudnn_frontend::graph::SDPA_attributes' [D:\b\Debug\onnxruntime_providers_cuda.vcxproj] D:\b\Debug_deps\cudnn_frontend-src\include\cudnn_frontend\graph_properties.h(1162,25): note: see declaration of 'cudnn_frontend::graph::SDPA_attributes::is_inference' D:\b\Debug_deps\cudnn_frontend-src\include\cudnn_frontend\graph_properties.h(1157,7): note: see declaration of 'cudnn_frontend::graph::SDPA_attributes'

tianleiwu avatar Mar 03 '24 04:03 tianleiwu

Hi @tianleiwu ,

I tried updating the MSVC version in our CI-CD but could not reproduce this error. Looking at the build log from the ONNX MR that you linked, I see

D:\b\Debug>"C:\vss-agent\2.314.1\_work\onnxruntime\onnxruntime\cuda_sdk\v12.2\bin\nvcc.exe" --use-local-env -ccbin "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.37.32822\bin\HostX64\x64" -x

which seems to be different from 19.37.32825

Is there any specific flags you are using? Because, I do not see anything explicitly incorrect in the code.

Anerudhan avatar Mar 04 '24 23:03 Anerudhan