8000 [CI] Enable HIP and CUDA plugins in GitHub Actions builds by alexbatashev · Pull Request #5087 · intel/llvm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[CI] Enable HIP and CUDA plugins in GitHub Actions builds #5087

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

Merged
merged 8 commits into from
Dec 14, 2021
Merged
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
13 changes: 9 additions & 4 deletions .github/workflows/sycl_linux_build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
build_image:
type: string
required: false
default: "ghcr.io/intel/llvm/ubuntu2004_base:latest"
default: "ghcr.io/intel/llvm/ubuntu2004_build:latest"
build_runs_on:
type: string
required: false
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
\"cc\":\"gcc\",
\"cxx\":\"g++\",
\"build_runs_on\":\"sycl-precommit-linux\",
\"build_image\":\"ghcr.io/intel/llvm/ubuntu2004_base:latest\",
\"build_image\":\"ghcr.io/intel/llvm/ubuntu2004_build:latest\",
\"build_github_cache\":\"false\",
\"build_cache_root\":\"/__w/\",
\"build_cache_suffix\":\"default\",
Expand Down Expand Up @@ -104,15 +104,18 @@ jobs:
CACHE_SUFFIX: ${{ fromJSON(needs.configure.outputs.params).build_cache_suffix }}
CACHE_SIZE: ${{ fromJSON(needs.configure.outputs.params).build_cache_size }}
ARGS: ${{ fromJSON(needs.configure.outputs.params).build_configure_extra_args }}
CUDA_LIB_PATH: "/usr/local/cuda/lib64/stubs"
run: |
mkdir -p $CACHE_ROOT/build_cache_$CACHE_SUFFIX
mkdir -p $GITHUB_WORKSPACE/build
cd $GITHUB_WORKSPACE/build
python3 $GITHUB_WORKSPACE/src/buildbot/configure.py -w $GITHUB_WORKSPACE \
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t Release \
--ci-defaults $ARGS --cmake-opt="-DLLVM_CCACHE_BUILD=ON" \
--ci-defaults $ARGS --cuda --hip --hip-amd-arch="gfx906" \
--cmake-opt="-DLLVM_CCACHE_BUILD=ON" \
--cmake-opt="-DLLVM_CCACHE_DIR=$CACHE_ROOT/build_cache_$CACHE_SUFFIX" \
--cmake-opt="-DLLVM_CCACHE_MAXSIZE=$CACHE_SIZE"
--cmake-opt="-DLLVM_CCACHE_MAXSIZE=$CACHE_SIZE" \
--cmake-opt="-DSYCL_PI_TESTS=OFF"
- name: Compile
run: cmake --build $GITHUB_WORKSPACE/build
# TODO allow to optionally disable in-tree checks
Expand All @@ -128,6 +131,8 @@ jobs:
- name: check-sycl
if: always()
run: |
# TODO consider moving this to Dockerfile
export LD_LIBRARY_PATH=/usr/local/cuda/compat/:/usr/local/cuda/lib64:$LD_LIBRARY_PATH
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to https://intel.github.io/llvm-docs/GetStartedGuide.html#build-dpc-toolchain-with-support-for-nvidia-cuda, this should not be required. I suggest filing an issue to investigate what is wrong here. Maybe NVIDIA docker image is not configured correctly.

I have the same question regarding --hip-amd-arch option. I don't see it listed as required option in the GetStartedGuide. Should we add it there?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe NVIDIA docker image is not configured correctly.

That is actually the case

I have the same question regarding --hip-amd-arch option. I don't see it listed as required option in the GetStartedGuide. Should we add it there?

It is mentioned here: https://intel.github.io/llvm-docs/GetStartedGuide.html#run-in-tree-lit-tests
The option is not required to build the compiler, only to test it.

cmake --build $GITHUB_WORKSPACE/build --target check-sycl
- name: check-llvm-spirv
if: always()
Expand Down
8 changes: 7 additions & 1 deletion sycl/unittests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,16 @@ string(TOLOWER "${CMAKE_BUILD_TYPE}" build_type_lower)

include(AddSYCLUnitTest)

# TODO PI tests require real hardware and must be moved to intel/llvm-test-suite
option(SYCL_PI_TESTS "Enable PI-specific unit tests" ON)

if (SYCL_PI_TESTS)
add_subdirectory(pi)
endif()

add_subdirectory(allowlist)
add_subdirectory(config)
add_subdirectory(misc)
add_subdirectory(pi)
add_subdirectory(kernel-and-program)
add_subdirectory(queue)
add_subdirectory(scheduler)
Expand Down
0