File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2929 check-path : ' .'
3030 exclude-regex : ' (^|/)(build|third_party|external|vendor|\.git)(/|$)'
3131 fallback-style : ' LLVM'
32+
33+ cuda-build :
34+ name : CUDA Build (compile only)
35+ runs-on : ubuntu-latest
36+ container :
37+ image : nvidia/cuda:12.4.1-devel-ubuntu22.04
38+ steps :
39+ - name : Install build tools
40+ run : apt-get update && apt-get install -y cmake git build-essential
41+
42+ - name : Checkout
43+ uses : actions/checkout@v4
44+
45+ - name : Configure CMake
46+ run : cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=OFF
47+
48+ - name : Build benchmark target
49+ run : cmake --build build --target sgemm_benchmark -j2
50+
51+ - name : Document runtime limitation
52+ run : |
53+ echo "This workflow validates CUDA compilation in a containerized toolkit environment."
54+ echo "GPU runtime tests still require a CUDA-capable local machine or dedicated GPU runner."
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ if(NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
2020 if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24" )
2121 set (CMAKE_CUDA_ARCHITECTURES native)
2222 else ()
23- set (CMAKE_CUDA_ARCHITECTURES 75 80 86 89)
23+ set (CMAKE_CUDA_ARCHITECTURES 70 75 80 86 89 90 )
2424 endif ()
2525endif ()
2626
Original file line number Diff line number Diff line change @@ -27,8 +27,9 @@ MAIN_SRC = $(SRC_DIR)/main.cu
2727TEST_SRC = $(TEST_DIR ) /test_sgemm.cu
2828
2929# Targets
30- MAIN_TARGET = $(BUILD_DIR ) /sgemm_benchmark
31- TEST_TARGET = $(BUILD_DIR ) /test_sgemm
30+ BIN_DIR = $(BUILD_DIR ) /bin
31+ MAIN_TARGET = $(BIN_DIR ) /sgemm_benchmark
32+ TEST_TARGET = $(BIN_DIR ) /test_sgemm
3233
3334# Header files (for dependency tracking)
3435HEADERS = $(wildcard $(KERNEL_DIR ) /* .cuh) $(wildcard $(UTILS_DIR ) /* .cuh)
@@ -39,6 +40,7 @@ all: dirs $(MAIN_TARGET)
3940
4041dirs :
4142 @mkdir -p $(BUILD_DIR )
43+ @mkdir -p $(BIN_DIR )
4244 @mkdir -p $(KERNEL_DIR )
4345 @mkdir -p $(UTILS_DIR )
4446 @mkdir -p $(TEST_DIR )
7981 @echo " profile - Build with profiling info"
8082 @echo " "
8183 @echo " Variables:"
82- @echo " GPU_ARCH - GPU architecture (default: sm_70 )"
84+ @echo " GPU_ARCH - GPU architecture (default: sm_86 )"
8385 @echo " "
8486 @echo " Example:"
8587 @echo " make GPU_ARCH=sm_80 benchmark"
You can’t perform that action at this time.
0 commit comments