Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
docs.it4i.cz
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SCS
docs.it4i.cz
Commits
4f96ec3c
Commit
4f96ec3c
authored
2 years ago
by
Jan Siwiec
Browse files
Options
Downloads
Patches
Plain Diff
Update nvidia-hip.md
parent
aaa80a7e
No related branches found
No related tags found
No related merge requests found
Pipeline
#29505
failed
2 years ago
Stage: test
Stage: build
Stage: deploy
Stage: after_test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs.it4i/software/nvidia-hip.md
+8
-3
8 additions, 3 deletions
docs.it4i/software/nvidia-hip.md
with
8 additions
and
3 deletions
docs.it4i/software/nvidia-hip.md
+
8
−
3
View file @
4f96ec3c
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
ROCm HIP allows developers to convert
[
CUDA code
][
a
]
to portable C++. The same source code can be compiled to run on NVIDIA or AMD GPUs.
ROCm HIP allows developers to convert
[
CUDA code
][
a
]
to portable C++. The same source code can be compiled to run on NVIDIA or AMD GPUs.
##
This page documents the use of pre-built Singularity
/
apptainer image on
k
arolina Accelerated nodes (acn
XX
)
This page documents the use of pre-built Singularity
/
apptainer image on
K
arolina Accelerated nodes (acn)
.
## Installed Versions of Singularity / apptainer
## Installed Versions of Singularity / apptainer
...
@@ -21,21 +21,25 @@ module load apptainer/1.1.5
...
@@ -21,21 +21,25 @@ module load apptainer/1.1.5
```
```
Run the container:
Run the container:
```
console
```
console
singularity shell /home/vic0092/rocm/centos7-nvidia-rocm.sif
singularity shell /home/vic0092/rocm/centos7-nvidia-rocm.sif
```
```
The above gives you Singularity / apptainer shell prompt:
The above gives you Singularity / apptainer shell prompt:
```
console
```
console
Singularity>
Singularity>
```
```
Verify that you have GPUs active and accessible on the given node:
Verify that you have GPUs active and accessible on the given node:
```
console
```
console
nvidia-smi
nvidia-smi
```
```
You should get output similar to:
You should get output similar to:
```
console
```
console
+-----------------------------------------------------------------------------+
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 515.65.07 Driver Version: 515.65.07 CUDA Version: 11.7 |
| NVIDIA-SMI 515.65.07 Driver Version: 515.65.07 CUDA Version: 11.7 |
...
@@ -173,12 +177,14 @@ int main(int argc, char *argv[])
...
@@ -173,12 +177,14 @@ int main(int argc, char *argv[])
```
```
First convert the CUDA sample code into HIP code:
First convert the CUDA sample code into HIP code:
```
console
```
console
cd /tmp
cd /tmp
/opt/rocm/hip/bin/hipify-perl sample.cu >
sample.cpp
/opt/rocm/hip/bin/hipify-perl sample.cu >
sample.cpp
```
```
This code can then be compiled using the following commands:
This code can then be compiled using the following commands:
```
console
```
console
cd /tmp
cd /tmp
export HIP_PLATFORM=$
(
/opt/rocm/hip/bin/hipconfig
--platform
)
export HIP_PLATFORM=$
(
/opt/rocm/hip/bin/hipconfig
--platform
)
...
@@ -187,6 +193,7 @@ $HIPCC sample.cpp -o sample
...
@@ -187,6 +193,7 @@ $HIPCC sample.cpp -o sample
```
```
Running it, you should get the following output:
Running it, you should get the following output:
```
console
```
console
Singularity>
cd
/tmp
Singularity>
cd
/tmp
Singularity>
./sample
Singularity>
./sample
...
@@ -200,6 +207,4 @@ info: check result
...
@@ -200,6 +207,4 @@ info: check result
PASSED!
PASSED!
```
```
That's all folks!
[
a
]:
nvidia-cuda.md
[
a
]:
nvidia-cuda.md
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment