Skip to content

Fix #55 - Properly detect version for Clang CUDA #56

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 2 commits into from
Jul 1, 2025
Merged
Changes from 1 commit
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
Prev Previous commit
Enable NVCC and clang-cc tests
  • Loading branch information
jfalcou committed Jul 1, 2025
commit 119c1b38223dbdfe74e33ae5eebc306276d2fe64
58 changes: 31 additions & 27 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,33 +144,37 @@ jobs:
- name: Running Unit Tests
run: cd build && ctest --verbose --output-on-failure -j 2

# ##################################################################################################
# ## NVCC targets
# ##################################################################################################
# nvcc:
# runs-on: ubuntu-latest
# container:
# image: nvcr.io/nvidia/nvhpc:24.11-devel-cuda_multi-ubuntu22.04
# steps:
# - name: Fetch current branch
# uses: actions/checkout@v4.1.1
# - name: Compiling Unit Tests
# run: |
# mkdir build && cd build
# nvc++ ../test/unit/accelerator.cu -std=c++20 -I../include -o accelerator.device.exe
# nvc++ ../test/unit/accelerator.cpp -std=c++20 -I../include -o accelerator.host.exe
# nvc++ ../test/unit/arch.cpp -std=c++20 -I../include -o arch.exe
# nvc++ ../test/unit/compiler.cpp -std=c++20 -I../include -o compiler.exe
# nvc++ ../test/unit/data_model.cpp -std=c++20 -I../include -o data_model.exe
# nvc++ ../test/unit/libc.cpp -std=c++20 -I../include -o libc.exe
# nvc++ ../test/unit/os.cpp -std=c++20 -I../include -o os.exe
# nvc++ ../test/unit/simd.cpp -std=c++20 -I../include -o simd.exe
# nvc++ ../test/unit/stdlib.cpp -std=c++20 -I../include -o stdlib.exe
# - name: Running Unit Tests
# run: |
# cd build
# ./accelerator.device.exe && ./accelerator.host.exe && ./arch.exe && ./compiler.exe && ./data_model.exe && \
# ./libc.exe && ./os.exe && ./simd.exe && ./stdlib.exe
##################################################################################################
## CUDA targets
##################################################################################################
nvcc:
runs-on: self-hosted
strategy:
fail-fast: false
matrix:
cfg:
- { comp: nvcc , opt: "" }
- { comp: clang++ , opt: "--cuda-gpu-arch=sm_75 -lcudart_static -L/opt/cuda/lib64/ -ldl -lrt -pthread" }
steps:
- name: Fetch current branch
uses: actions/checkout@v4.1.1
- name: Compiling Unit Tests with ${{ matrix.cfg.comp }}
run: |
mkdir build && cd build
${{ matrix.cfg.comp }} ${{ matrix.cfg.opt }} ../test/unit/accelerator.cu -std=c++20 -I../include -o accelerator.device.exe
${{ matrix.cfg.comp }} ${{ matrix.cfg.opt }} ../test/unit/accelerator.cpp -std=c++20 -I../include -o accelerator.host.exe
${{ matrix.cfg.comp }} ${{ matrix.cfg.opt }} ../test/unit/arch.cpp -std=c++20 -I../include -o arch.exe
${{ matrix.cfg.comp }} ${{ matrix.cfg.opt }} ../test/unit/compiler.cpp -std=c++20 -I../include -o compiler.exe
${{ matrix.cfg.comp }} ${{ matrix.cfg.opt }} ../test/unit/data_model.cpp -std=c++20 -I../include -o data_model.exe
${{ matrix.cfg.comp }} ${{ matrix.cfg.opt }} ../test/unit/libc.cpp -std=c++20 -I../include -o libc.exe
${{ matrix.cfg.comp }} ${{ matrix.cfg.opt }} ../test/unit/os.cpp -std=c++20 -I../include -o os.exe
${{ matrix.cfg.comp }} ${{ matrix.cfg.opt }} ../test/unit/simd.cpp -std=c++20 -I../include -o simd.exe
${{ matrix.cfg.comp }} ${{ matrix.cfg.opt }} ../test/unit/stdlib.cpp -std=c++20 -I../include -o stdlib.exe
- name: Running Unit Tests
run: |
cd build
./accelerator.device.exe && ./accelerator.host.exe && ./arch.exe && ./compiler.exe && ./data_model.exe && \
./libc.exe && ./os.exe && ./simd.exe && ./stdlib.exe

##################################################################################################
## DPC++ Target
Expand Down