Skip to content

Commit

Permalink
NVIDA test
Browse files Browse the repository at this point in the history
  • Loading branch information
msaroufim committed Nov 12, 2024
1 parent 8634493 commit 66495dd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/train_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
train:
runs-on: [amdgpu-mi250-x86-64]
runs-on: [gpumode-nvidia-arc]

steps:
- name: Setup Python
Expand All @@ -21,7 +21,7 @@ jobs:
- name: Install dependencies
run: |
pip install numpy
pip install torch --index-url https://download.pytorch.org/whl/rocm6.2
pip install torch
- name: Create training script
shell: python
Expand Down
12 changes: 4 additions & 8 deletions train.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
import torch

a = torch.Tensor([1, 2, 3, 4, 5]).to("cuda")
b= torch.Tensor([1, 2, 3, 4, 5]).to("cuda")

if torch.cuda.is_available():
gpu_name = torch.cuda.get_device_name(0)
print(f"GPU Name: {gpu_name}")
else:
print("No GPU available")
a = torch.Tensor([1, 2, 3, 4, 5]).cuda()
b= torch.Tensor([1, 2, 3, 4, 5]).cuda()

print(a)
print(b)
print(a + b)

0 comments on commit 66495dd

Please sign in to comment.