Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/sycl' into fabio/fix_kernel_arg_…
Browse files Browse the repository at this point in the history
…indices
  • Loading branch information
kbenzie committed Jan 24, 2025
2 parents 371fe15 + 4f29c44 commit aa10754
Show file tree
Hide file tree
Showing 102 changed files with 462 additions and 353 deletions.
1 change: 0 additions & 1 deletion .github/workflows/pr-code-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:
branches:
- main
- sycl
- sycl-devops-pr/**
- sycl-rel-**
- 'users/**'

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/sycl-linux-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ jobs:
cmake --build $GITHUB_WORKSPACE/build --target check-sycl-unittests
- name: check-llvm-spirv
if: always() && !cancelled() && contains(inputs.changes, 'llvm_spirv')
# Temporary workaround to disable running tests requiring spirv-tools.
env:
LIT_OPTS: "--param disable-spirv-tools=True"
run: |
cmake --build $GITHUB_WORKSPACE/build --target check-llvm-spirv
- name: check-xptifw
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/sycl-linux-precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
pull_request:
branches:
- sycl
- sycl-devops-pr/**
- sycl-rel-**
# Do not run builds if changes are only in the following locations
paths-ignore:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/sycl-post-commit.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: SYCL Post Commit

on:
workflow_dispatch:

push:
branches:
- sycl
- sycl-devops-pr/**
- sycl-rel-**

pull_request:
branches:
- sycl
- sycl-devops-pr/**
paths:
- .github/workflows/sycl-post-commit.yml
- .github/workflows/sycl-linux-build.yml
Expand Down Expand Up @@ -106,6 +106,7 @@ jobs:
compiler: icx
build_configure_extra_args: --cmake-opt=-DCMAKE_C_FLAGS="/clang:-Wno-nonportable-include-path /clang:-Wno-cast-function-type-mismatch" --cmake-opt=-DCMAKE_CXX_FLAGS="/clang:-Wno-nonportable-include-path /clang:-Wno-cast-function-type-mismatch" --cmake-opt="-DCMAKE_EXE_LINKER_FLAGS=/manifest:no" --cmake-opt="-DCMAKE_MODULE_LINKER_FLAGS=/manifest:no" --cmake-opt="-DCMAKE_SHARED_LINKER_FLAGS=/manifest:no"
build_cache_suffix: icx
merge_ref: ''

e2e-win:
needs: build-win
Expand All @@ -120,6 +121,7 @@ jobs:
runner: '["Windows","gen12"]'
sycl_toolchain_archive: ${{ needs.build-win.outputs.artifact_archive_name }}
compiler: icx
merge_ref: ''

macos_default:
name: macOS
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/sycl-windows-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ jobs:
cmake --build build --target check-sycl-unittests
- name: check-llvm-spirv
if: always() && !cancelled() && contains(inputs.changes, 'llvm_spirv')
# Temporary workaround to disable running tests requiring spirv-tools.
env:
LIT_OPTS: "--param disable-spirv-tools=True"
run: |
cmake --build build --target check-llvm-spirv
- name: check-xptifw
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/sycl-windows-precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
pull_request:
branches:
- sycl
- sycl-devops-pr/**
- llvmspirv_pulldown
- sycl-rel-**
# Do not run builds if changes are only in the following locations
Expand Down Expand Up @@ -43,6 +42,7 @@ jobs:
uses: ./.github/workflows/sycl-windows-build.yml
with:
changes: ${{ needs.detect_changes.outputs.filters }}
merge_ref: ''

e2e:
needs: build
Expand All @@ -56,3 +56,4 @@ jobs:
name: Intel GEN12 Graphics with Level Zero
runner: '["Windows","gen12"]'
sycl_toolchain_archive: ${{ needs.build.outputs.artifact_archive_name }}
merge_ref: ''
2 changes: 1 addition & 1 deletion devops/actions/run-tests/e2e/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ runs:
exit_code=$?
cat e2e.log
if [ $exit_code -ne 0 ]; then
awk '/^Failed Tests|Unexpectedly Passed Tests|Unresolved tests|Testing Time/{flag=1}/FAILED: CMakeFiles/{flag=0}flag' e2e.log >> $GITHUB_STEP_SUMMARY
awk '/^Failed Tests|Unexpectedly Passed Tests|Unresolved tests|Timed Out Tests|Testing Time/{flag=1}/FAILED: CMakeFiles/{flag=0}flag' e2e.log >> $GITHUB_STEP_SUMMARY
fi
exit $exit_code
Expand Down
11 changes: 7 additions & 4 deletions llvm-spirv/test/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,24 +60,27 @@

using_spirv_tools = False

if config.spirv_tools_have_spirv_as:
# Explicitly disable using spirv tools, if requested.
disable_spirv_tools = lit_config.params.get("disable-spirv-tools", False)

if config.spirv_tools_have_spirv_as and not disable_spirv_tools:
llvm_config.add_tool_substitutions(['spirv-as'], [config.spirv_tools_bin_dir])
config.available_features.add('spirv-as')
using_spirv_tools = True

if config.spirv_tools_have_spirv_dis:
if config.spirv_tools_have_spirv_dis and not disable_spirv_tools:
llvm_config.add_tool_substitutions(['spirv-dis'], [config.spirv_tools_bin_dir])
config.available_features.add('spirv-dis')
using_spirv_tools = True

if config.spirv_tools_have_spirv_link:
if config.spirv_tools_have_spirv_link and not disable_spirv_tools:
llvm_config.add_tool_substitutions(['spirv-link'], [config.spirv_tools_bin_dir])
config.available_features.add('spirv-link')
using_spirv_tools = True

# Unlike spirv-{as,dis,link} above, running spirv-val is optional: if spirv-val is
# not available, the test must still run and just skip any spirv-val commands.
if config.spirv_tools_have_spirv_val:
if config.spirv_tools_have_spirv_val and not disable_spirv_tools:
llvm_config.add_tool_substitutions(['spirv-val'], [config.spirv_tools_bin_dir])
using_spirv_tools = True
else:
Expand Down
5 changes: 5 additions & 0 deletions sycl/source/detail/device_info.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,11 @@ template <>
struct get_device_info_impl<std::vector<info::execution_capability>,
info::device::execution_capabilities> {
static std::vector<info::execution_capability> get(const DeviceImplPtr &Dev) {
if (Dev->getBackend() != backend::opencl)
throw exception(make_error_code(errc::invalid),
"info::device::execution_capabilities is available for "
"backend::opencl only");

ur_device_exec_capability_flag_t result;
Dev->getAdapter()->call<UrApiKind::urDeviceGetInfo>(
Dev->getHandleRef(),
Expand Down
14 changes: 11 additions & 3 deletions sycl/test-e2e/Basic/info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,17 @@ int main() {
dev, "Is compiler available");
print_info<info::device::is_linker_available, bool>(dev,
"Is linker available");
print_info<info::device::execution_capabilities,
std::vector<info::execution_capability>>(dev,
"Execution capabilities");
try {
print_info<info::device::execution_capabilities,
std::vector<info::execution_capability>>(
dev, "Execution capabilities");
assert(backend == sycl::backend::opencl &&
"An exception is expected for non OpenCL backend");
} catch (const sycl::exception &e) {
assert(e.code() == sycl::errc::invalid &&
backend != sycl::backend::opencl && "Unexpected exception");
}

print_info<info::device::queue_profiling, bool>(dev, "Queue profiling");
print_info<info::device::built_in_kernels, std::vector<std::string>>(
dev, "Built in kernels");
Expand Down
Loading

0 comments on commit aa10754

Please sign in to comment.