Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Test runner #14114

Draft
wants to merge 4 commits into
base: sycl
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/sycl-windows-run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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=$?
Expand Down
8 changes: 7 additions & 1 deletion clang/lib/Sema/SemaDeclAttr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
}
Expand Down
18 changes: 18 additions & 0 deletions clang/test/SemaSYCL/Inputs/vectorcall.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

template <typename F> struct A{};

template <typename Ret, typename C, typename... Args> struct A<Ret ( C::*)(Args...) noexcept> { static constexpr int value = 0; };
template <typename Ret, typename C, typename... Args> struct A<Ret (__vectorcall C::*)(Args...) noexcept> { static constexpr int value = 1; };

template <typename F> constexpr int A_v = A<F>::value;

struct B
{
void f() noexcept {}
void __vectorcall g() noexcept {}
};

int main()
{
return A_v<decltype(&B::f)> + A_v<decltype(&B::g)>;
}
5 changes: 5 additions & 0 deletions clang/test/SemaSYCL/sycl-cconv-win.cpp
Original file line number Diff line number Diff line change
@@ -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 <vectorcall.hpp>
2 changes: 1 addition & 1 deletion sycl/source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down
Original file line number Diff line number Diff line change
@@ -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

Expand Down
8 changes: 8 additions & 0 deletions sycl/test-e2e/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,13 +437,17 @@ 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 = (
" "
+ (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))
Expand Down Expand Up @@ -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 = (
Expand All @@ -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():
Expand Down
Loading