fuliucansheng commited on
Commit
7e91bd7
1 Parent(s): 2e01f83
Files changed (2) hide show
  1. gpu.py +11 -0
  2. rocm52.py38.sh +32 -0
gpu.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (c) FULIUCANSHENG.
2
+ # Licensed under the MIT License.
3
+
4
+ import time
5
+ import torch
6
+
7
+ tensor = torch.rand(10240, 10240).cuda()
8
+
9
+ while True:
10
+ _ = torch.matmul(tensor, tensor)
11
+ time.sleep(1)
rocm52.py38.sh ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash -
2
+ #===============================================================================
3
+ #
4
+ # FILE: py38.sh
5
+ #
6
+ # USAGE: ./py38.sh
7
+ #
8
+ # DESCRIPTION:
9
+ #
10
+ # OPTIONS: ---
11
+ # REQUIREMENTS: ---
12
+ # BUGS: ---
13
+ # NOTES: ---
14
+ # AUTHOR: fuliucansheng (fuliu), fuliucansheng@gmail.com
15
+ # ORGANIZATION:
16
+ # CREATED: 06/17/2023 00:14
17
+ # REVISION: ---
18
+ #===============================================================================
19
+
20
+ set -o nounset # Treat unset variables as an error
21
+
22
+ sudo apt update
23
+
24
+ sudo apt install python3.8-dev python3-pip
25
+
26
+ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
27
+ sudo python3.8 get-pip.py
28
+
29
+ sudo rm -rf get-pip.py
30
+
31
+ sudo pip3.8 install torch==1.13.1+rocm5.2 torchvision==0.14.1+rocm5.2 torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/rocm5.2
32
+