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
3841dc42
Commit
3841dc42
authored
2 years ago
by
Jan Siwiec
Browse files
Options
Downloads
Patches
Plain Diff
Update nvidia-hip.md
parent
f1e895c3
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Pipeline
#29509
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
+4
-4
4 additions, 4 deletions
docs.it4i/software/nvidia-hip.md
with
4 additions
and
4 deletions
docs.it4i/software/nvidia-hip.md
+
4
−
4
View file @
3841dc42
...
@@ -29,7 +29,7 @@ singularity shell /home/vic0092/rocm/centos7-nvidia-rocm.sif
...
@@ -29,7 +29,7 @@ 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:
...
@@ -111,7 +111,7 @@ In this section, we show a basic code example. You can directly copy and paste t
...
@@ -111,7 +111,7 @@ In this section, we show a basic code example. You can directly copy and paste t
}
}
/*
/*
* Square each element in the array A and write to array C.
* Square each element in the array A and write to array C.
*/
*/
template
<
typename
T
>
template
<
typename
T
>
...
@@ -144,9 +144,9 @@ int main(int argc, char *argv[])
...
@@ -144,9 +144,9 @@ int main(int argc, char *argv[])
C_h
=
(
float
*
)
malloc
(
Nbytes
);
C_h
=
(
float
*
)
malloc
(
Nbytes
);
CHECK
(
C_h
==
0
?
cudaErrorMemoryAllocation
:
cudaSuccess
);
CHECK
(
C_h
==
0
?
cudaErrorMemoryAllocation
:
cudaSuccess
);
// Fill with Phi + i
// Fill with Phi + i
for
(
size_t
i
=
0
;
i
<
N
;
i
++
)
for
(
size_t
i
=
0
;
i
<
N
;
i
++
)
{
{
A_h
[
i
]
=
1.618
f
+
i
;
A_h
[
i
]
=
1.618
f
+
i
;
}
}
printf
(
"info: allocate device mem (%6.2f MB)
\n
"
,
2
*
Nbytes
/
1024.0
/
1024.0
);
printf
(
"info: allocate device mem (%6.2f MB)
\n
"
,
2
*
Nbytes
/
1024.0
/
1024.0
);
...
...
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