diff --git a/.github/workflows/sycl-windows-run-tests.yml b/.github/workflows/sycl-windows-run-tests.yml index dadf77eb2773b..fae961cd0b712 100644 --- a/.github/workflows/sycl-windows-run-tests.yml +++ b/.github/workflows/sycl-windows-run-tests.yml @@ -139,6 +139,7 @@ jobs: run: | echo "PATH=$env:GITHUB_WORKSPACE\\install\\bin;$env:PATH" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append echo "LIB=$env:GITHUB_WORKSPACE\\install\\lib;$env:LIB" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "ROCM_PATH=C:\\Program Files\\AMD\\ROCm\\6.2" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - run: | sycl-ls - run: | @@ -156,9 +157,9 @@ jobs: LIT_OPTS: -v --no-progress-bar --show-unsupported --show-pass --show-xfail --max-time 3600 --time-tests --param print_features=True ${{ inputs.extra_lit_opts }} run: | # Run E2E tests. - if [[ ${{inputs.compiler}} == 'icx' ]]; then - export LIT_FILTER_OUT="compile_on_win_with_mdd" - fi + #if [[ ${{inputs.compiler}} == 'icx' ]]; then + export LIT_FILTER="is_compat" + #fi cmake --build build-e2e --target check-sycl-e2e > e2e.log 2>&1 exit_code=$? diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp index 2b2151d8c5c94..1db99503185ae 100644 --- a/clang/lib/Sema/SemaDeclAttr.cpp +++ b/clang/lib/Sema/SemaDeclAttr.cpp @@ -5303,12 +5303,12 @@ bool Sema::CheckCallingConvAttr(const ParsedAttr &Attrs, CallingConv &CC, } TargetInfo::CallingConvCheckResult A = TargetInfo::CCCR_OK; + auto *Aux = Context.getAuxTargetInfo(); // CUDA functions may have host and/or device attributes which indicate // their targeted execution environment, therefore the calling convention // of functions in CUDA should be checked against the target deduced based // on their host/device attributes. if (LangOpts.CUDA) { - auto *Aux = Context.getAuxTargetInfo(); assert(FD || CFT != CUDAFunctionTarget::InvalidTarget); auto CudaTarget = FD ? CUDA().IdentifyTarget(FD) : CFT; bool CheckHost = false, CheckDevice = false; @@ -5333,6 +5333,12 @@ bool Sema::CheckCallingConvAttr(const ParsedAttr &Attrs, CallingConv &CC, A = HostTI->checkCallingConvention(CC); if (A == TargetInfo::CCCR_OK && CheckDevice && DeviceTI) A = DeviceTI->checkCallingConvention(CC); + } else if (LangOpts.SYCLIsDevice && (Aux && Aux->getTriple().isOSWindows()) && + TI.getTriple().isAMDGPU() && + getSourceManager().isInSystemHeader(Attrs.getScopeLoc())) { + A = TI.checkCallingConvention(CC); + if (A != TargetInfo::CCCR_OK) + A = Aux->checkCallingConvention(CC); } else { A = TI.checkCallingConvention(CC); } diff --git a/clang/test/SemaSYCL/Inputs/vectorcall.hpp b/clang/test/SemaSYCL/Inputs/vectorcall.hpp new file mode 100644 index 0000000000000..566a48dd24c30 --- /dev/null +++ b/clang/test/SemaSYCL/Inputs/vectorcall.hpp @@ -0,0 +1,18 @@ + +template struct A{}; + +template struct A { static constexpr int value = 0; }; +template struct A { static constexpr int value = 1; }; + +template constexpr int A_v = A::value; + +struct B +{ + void f() noexcept {} + void __vectorcall g() noexcept {} +}; + +int main() +{ + return A_v + A_v; +} diff --git a/clang/test/SemaSYCL/sycl-cconv-win.cpp b/clang/test/SemaSYCL/sycl-cconv-win.cpp new file mode 100644 index 0000000000000..f0c22a2ed3921 --- /dev/null +++ b/clang/test/SemaSYCL/sycl-cconv-win.cpp @@ -0,0 +1,5 @@ +// RUN: %clang_cc1 -isystem %S/Inputs/ -fsycl-is-device -triple amdgcn-amd-hsa -aux-triple x86_64-pc-windows-msvc -fsyntax-only -verify %s + +// expected-no-diagnostics + +#include diff --git a/sycl/source/CMakeLists.txt b/sycl/source/CMakeLists.txt index 2570921a2d565..deaead32dfd88 100644 --- a/sycl/source/CMakeLists.txt +++ b/sycl/source/CMakeLists.txt @@ -136,7 +136,7 @@ function(add_sycl_rt_library LIB_NAME LIB_OBJ_NAME) target_link_libraries(${LIB_NAME} PRIVATE ${ARG_XPTI_LIB}) endif() - if (NOT LLVM_ENABLE_ZSTD) + if (true) target_compile_definitions(${LIB_OBJ_NAME} PRIVATE SYCL_RT_ZSTD_NOT_AVAIABLE) else() target_link_libraries(${LIB_NAME} PRIVATE ${zstd_STATIC_LIBRARY}) diff --git a/sycl/test-e2e/OptionalKernelFeatures/is_compatible/is_compatible_amdgcn.cpp b/sycl/test-e2e/OptionalKernelFeatures/is_compatible/is_compatible_amdgcn.cpp index dd1a2372e4df2..8bfce0f1aeb6b 100644 --- a/sycl/test-e2e/OptionalKernelFeatures/is_compatible/is_compatible_amdgcn.cpp +++ b/sycl/test-e2e/OptionalKernelFeatures/is_compatible/is_compatible_amdgcn.cpp @@ -1,6 +1,4 @@ -// UNSUPPORTED: windows -// UNSUPPORTED-TRACKER: https://github.com/intel/llvm/issues/17515 -// There are no ROCm libs on win machines, so the compilation fails. +// REQUIRES: hip_dev_kit // RUN: %clangxx -fsycl -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend=amdgcn-amd-amdhsa --offload-arch=gfx1030 %S/Inputs/is_compatible_with_env.cpp -o %t.out diff --git a/sycl/test-e2e/lit.cfg.py b/sycl/test-e2e/lit.cfg.py index 222ae37208b59..c5602e5065d27 100644 --- a/sycl/test-e2e/lit.cfg.py +++ b/sycl/test-e2e/lit.cfg.py @@ -437,6 +437,8 @@ def open_check_file(file_name): + " -lcuda " + " -I" + config.cuda_include + + "--cuda-path=" + + os.path.dirname(config.cuda_libs_dir) ) if cl_options: cuda_options = ( @@ -444,6 +446,8 @@ def open_check_file(file_name): + (config.cuda_libs_dir + "/cuda.lib " if config.cuda_libs_dir else "cuda.lib") + " /I" + config.cuda_include + + "--cuda-path=" + + os.path.dirname(config.cuda_libs_dir) ) config.substitutions.append(("%cuda_options", cuda_options)) @@ -486,6 +490,8 @@ def open_check_file(file_name): + " -lamdhip64 " + " -I" + config.hip_include + + "--rocm-path=" + + os.path.dirname(config.hip_libs_dir) ) if cl_options: hip_options = ( @@ -497,6 +503,8 @@ def open_check_file(file_name): ) + " /I" + config.hip_include + + "--rocm-path=" + + os.path.dirname(config.hip_libs_dir) ) with test_env():