Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
hpc-compendium
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ZIH
hpcsupport
hpc-compendium
Commits
8474993c
Commit
8474993c
authored
3 years ago
by
Martin Schroschk
Browse files
Options
Downloads
Patches
Plain Diff
Fix spelling
parent
24ec0536
No related branches found
Branches containing commit
No related tags found
3 merge requests
!412
Manual attempt to merge preview into main
,
!402
Solved issue-194. Added missing information regarding usage of SSH config for...
,
!388
Resolve "Missing a tutorial about how to get a PyTorch to GPUs"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc.zih.tu-dresden.de/docs/software/pytorch.md
+9
-9
9 additions, 9 deletions
doc.zih.tu-dresden.de/docs/software/pytorch.md
doc.zih.tu-dresden.de/wordlist.aspell
+2
-0
2 additions, 0 deletions
doc.zih.tu-dresden.de/wordlist.aspell
with
11 additions
and
9 deletions
doc.zih.tu-dresden.de/docs/software/pytorch.md
+
9
−
9
View file @
8474993c
...
...
@@ -2,10 +2,10 @@
[
PyTorch
](
https://pytorch.org/
)
is an open-source machine learning framework.
It is an optimized tensor library for deep learning using GPUs and CPUs.
PyTorch is a machine learning tool developed by Facebooks AI division to process large-scale
PyTorch is a machine learning tool developed by Facebook
'
s AI division to process large-scale
object detection, segmentation, classification, etc.
PyTorch provides a core data structure, the tensor, a multi-dimensional array that shares many
similarities with Num
p
y arrays.
similarities with Num
P
y arrays.
Please check the software modules list via
...
...
@@ -47,7 +47,7 @@ Module GCC/10.2.0, CUDA/11.1.1, OpenMPI/4.0.5, PyTorch/1.9.0 and 54 dependencies
```
Using the **--no-deps** option for "pip install" is necessary here as otherwise the PyTorch
version might be replaced and you will run into trouble with the
cuda
drivers.
version might be replaced and you will run into trouble with the
CUDA
drivers.
On the partition
`ml`
:
...
...
@@ -65,8 +65,8 @@ marie@login$ module spider pytorch
we know that we can load PyTorch (including torchvision) with
```
console
marie@ml$
module load modenv/ml torchvision/0.7.0-foss
cuda
-2019b-Python-3.7.4-PyTorch-1.6.0
Module torchvision/0.7.0-foss
cuda
-2019b-Python-3.7.4-PyTorch-1.6.0 and 55 dependencies loaded.
marie@ml$
module load modenv/ml torchvision/0.7.0-foss
CUDA
-2019b-Python-3.7.4-PyTorch-1.6.0
Module torchvision/0.7.0-foss
CUDA
-2019b-Python-3.7.4-PyTorch-1.6.0 and 55 dependencies loaded.
```
Now, we check that we can access PyTorch:
...
...
@@ -110,17 +110,17 @@ For details on how to run PyTorch with multiple GPUs and/or multiple nodes, see
It is recommended to use GPUs when using large training data sets. While TensorFlow automatically
uses GPUs if they are available, in PyTorch you have to move your tensors manually.
First, you need to import
`torch.
cuda
`
:
First, you need to import
`torch.
CUDA
`
:
```
python3
import torch.
cuda
import torch.
CUDA
```
Then you define a
`device`
-variable, which is set to '
cuda
' automatically when a GPU is available
Then you define a
`device`
-variable, which is set to '
CUDA
' automatically when a GPU is available
with this code:
```
python3
device = torch.device('
cuda
' if torch.
cuda
.is_available() else 'cpu')
device = torch.device('
CUDA
' if torch.
CUDA
.is_available() else 'cpu')
```
You then have to move all of your tensors to the selected device. This looks like this:
...
...
This diff is collapsed.
Click to expand it.
doc.zih.tu-dresden.de/wordlist.aspell
+
2
−
0
View file @
8474993c
...
...
@@ -320,6 +320,8 @@ todo
ToDo
toolchain
toolchains
torchvision
Torchvision
tracefile
tracefiles
transferability
...
...
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