Skip to content

Commit 34d4b22

Browse files
priteauMoteHue
authored andcommitted
Update nvidia drivers (to 570-open) CUDA packages (to 12.8.1-1) and samples playbook (stackhpc#628)
* Bump CUDA and NVIDIA driver versions * Update CUDA samples playbook for CUDA 12.8
1 parent 69aa166 commit 34d4b22

File tree

3 files changed

+22
-16
lines changed

3 files changed

+22
-16
lines changed

ansible/adhoc/cudatests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
- hosts: cuda
22
become: yes
3-
gather_facts: no
3+
gather_facts: yes
44
tags: cuda_samples
55
tasks:
66
- import_role:

ansible/roles/cuda/defaults/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cuda_repo_url: "https://developer.download.nvidia.com/compute/cuda/repos/rhel{{ ansible_distribution_major_version }}/{{ ansible_architecture }}/cuda-rhel{{ ansible_distribution_major_version }}.repo"
2-
cuda_nvidia_driver_stream: '560-open' # 565-open has problems with cuda packages
3-
cuda_package_version: '12.6.3-1'
2+
cuda_nvidia_driver_stream: '570-open'
3+
cuda_package_version: '12.8.1-1'
44
cuda_packages:
55
- "cuda{{ ('-' + cuda_package_version) if cuda_package_version != 'latest' else '' }}"
66
- nvidia-gds

ansible/roles/cuda/tasks/samples.yml

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
- name: Read cuda version file
1+
- name: Read CUDA version file
22
slurp:
33
src: /usr/local/cuda/version.json
44
register: _cuda_samples_version
55

6-
- name: Set fact for discovered cuda version
6+
- name: Set fact for discovered CUDA version
77
set_fact:
88
_cuda_version_tuple: "{{ (_cuda_samples_version.content | b64decode | from_json).cuda.version | split('.') }}" # e.g. '12.1.0'
99

@@ -14,33 +14,39 @@
1414
owner: "{{ ansible_user }}"
1515
group: "{{ ansible_user }}"
1616

17-
- name: Download cuda sample release
17+
- name: Download CUDA samples release
1818
unarchive:
1919
remote_src: yes
2020
src: "{{ cuda_samples_release_url }}"
2121
dest: "{{ cuda_samples_path }}"
2222
owner: "{{ ansible_user }}"
2323
group: "{{ ansible_user }}"
24+
creates: "{{ cuda_samples_path }}/cuda-samples-{{ cuda_version_short }}"
2425

25-
- name: Build cuda samples
26+
- name: Create CUDA samples build directory
27+
file:
28+
state: directory
29+
path: "{{ cuda_samples_path }}/cuda-samples-{{ cuda_version_short }}/build"
30+
31+
- name: Build CUDA samples
2632
shell:
27-
cmd: make
28-
chdir: "{{ cuda_samples_path }}/cuda-samples-{{ cuda_version_short }}/Samples/1_Utilities/{{ item }}"
29-
creates: "{{ cuda_samples_path }}/cuda-samples-{{ cuda_version_short }}/bin/x86_64/linux/release/{{ item }}"
30-
loop: "{{ cuda_samples_programs }}"
33+
# We need to source /etc/profile.d/sh.local to add CUDA to the PATH
34+
cmd: . /etc/profile.d/sh.local && cmake .. && make -j {{ ansible_processor_vcpus }}
35+
chdir: "{{ cuda_samples_path }}/cuda-samples-{{ cuda_version_short }}/build"
36+
creates: "{{ cuda_samples_path }}/cuda-samples-{{ cuda_version_short }}/build/Samples/1_Utilities/deviceQuery/deviceQuery"
3137

32-
- name: Run cuda deviceQuery
38+
- name: Run CUDA deviceQuery
3339
command:
34-
cmd: "{{ cuda_samples_path }}/cuda-samples-{{ cuda_version_short }}/bin/x86_64/linux/release/deviceQuery"
40+
cmd: "{{ cuda_samples_path }}/cuda-samples-{{ cuda_version_short }}/build/Samples/1_Utilities/deviceQuery/deviceQuery"
3541
register: _cuda_devicequery
3642

37-
- name: Set fact for cuda devices
43+
- name: Set fact for CUDA devices
3844
set_fact:
3945
cuda_devices: "{{ _cuda_devicequery.stdout | regex_findall('Device (\\d+):') }}"
4046

41-
- name: Run cuda bandwidth test
47+
- name: Run CUDA bandwidth test
4248
command:
43-
cmd: "{{ cuda_samples_path }}/cuda-samples-{{ cuda_version_short }}/bin/x86_64/linux/release/bandwidthTest --device={{ item }}"
49+
cmd: "{{ cuda_samples_path }}/cuda-samples-{{ cuda_version_short }}/build/Samples/1_Utilities/bandwidthTest/bandwidthTest --device={{ item }}"
4450
register: _cuda_bandwidthtest
4551
loop: "{{ cuda_devices }}"
4652
loop_control:

0 commit comments

Comments
 (0)