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

Using the variable CUDA-ARCH instead of hard coding #647

Closed
wants to merge 25 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
8b3c87a
Using the variable CUDA-ARCH instead of hard coding
DragonPara Jun 21, 2024
88b2828
Create cuda-build.yml
DragonPara Jun 21, 2024
6d6d112
Create cuda_build_windows.yml
DragonPara Jun 21, 2024
9b46314
Update cuda_build_windows.yml
DragonPara Jun 21, 2024
358b14a
Update cuda_build_windows.yml
DragonPara Jun 21, 2024
ff96231
Update cuda_build_windows.yml
DragonPara Jun 21, 2024
f077d7b
Update cuda_build_windows.yml
DragonPara Jun 21, 2024
e17f38c
Update cuda_build_windows.yml
DragonPara Jun 21, 2024
97d0198
Update cuda_build_windows.yml
DragonPara Jun 21, 2024
77461e6
Update cuda_build_windows.yml
DragonPara Jun 21, 2024
48e7c7f
Update cuda_build_windows.yml
DragonPara Jun 21, 2024
9323216
Update cuda_build_windows.yml
DragonPara Jun 21, 2024
7da5ee8
Update cuda_build_windows.yml
DragonPara Jun 21, 2024
53e3a1d
Update cuda_build_windows.yml
DragonPara Jun 21, 2024
de7c080
Update cuda_build_windows.yml
DragonPara Jun 21, 2024
6b08644
Update cuda_build_windows.yml
DragonPara Jun 21, 2024
5b1685a
Update cuda_build_windows.yml
DragonPara Jun 21, 2024
5494416
Update cuda_build_windows.yml
DragonPara Jun 21, 2024
4d530f2
Update cuda_build_windows.yml
DragonPara Jun 21, 2024
d9da530
Update cuda_build_windows.yml
DragonPara Jun 21, 2024
1322936
Update cuda_build_windows.yml
DragonPara Jun 21, 2024
ab43106
Update cuda_build_windows.yml
DragonPara Jun 21, 2024
db17fa7
Update cuda_build_windows.yml
DragonPara Jun 21, 2024
c89de98
Update cuda_build_windows.yml
DragonPara Jun 21, 2024
031d1eb
Update cuda_build_windows.yml
DragonPara Jun 21, 2024
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
24 changes: 24 additions & 0 deletions .github/workflows/cuda-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: CUDA CI

on:
pull_request:
branches:
- master # 你可以根据需要调整分支

jobs:
build:
runs-on: ubuntu-latest
container:
image: nvidia/cuda:11.2.2-devel-ubuntu20.04 # 使用适合你的CUDA版本的官方NVIDIA容器

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install dependencies
run: |
apt-get update
apt-get install -y build-essential
- name: Build with Make
run: cd src && make
32 changes: 32 additions & 0 deletions .github/workflows/cuda_build_windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: CUDA CI on Windows

on:
pull_request:
branches:
- master

jobs:
build:
runs-on: windows-2019

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up MSVC environment
uses: ilammy/[email protected]
with:
arch: x64
vsversion: "2019"

- name: Install CUDA
run: |
choco install cuda --version=11.2.2.46133
- name: Build project
shell: cmd
run: |
set PATH=%PATH%;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2\bin
nvcc --version
cd src && make
5 changes: 3 additions & 2 deletions src/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@
# some flags
###########################################################
CC = nvcc
CUDA_ARCH=-arch=sm_60
ifdef OS # For Windows with the cl.exe compiler
CFLAGS = -O3 -arch=sm_60 -Xcompiler "/wd 4819"
CFLAGS = -O3 $(CUDA_ARCH) -Xcompiler "/wd 4819"
else # For linux
CFLAGS = -std=c++14 -O3 -arch=sm_60
CFLAGS = -std=c++14 -O3 $(CUDA_ARCH)
endif
INC = -I./
LDFLAGS =
Expand Down
Loading