Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion imagenet/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ def run_validate(loader, base_progress=0):
i = base_progress + i
if use_accel:
if args.gpu is not None and device.type=='cuda':
torch.accelerator.set_device_index(argps.gpu)
torch.accelerator.set_device_index(args.gpu)
images = images.cuda(args.gpu, non_blocking=True)
target = target.cuda(args.gpu, non_blocking=True)
else:
Expand Down
1 change: 1 addition & 0 deletions run_python_examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ function imagenet() {
cp sample/train/n/* sample/val/n/
fi
uv run main.py --epochs 1 sample/ || error "imagenet example failed"
uv run main.py --epochs 1 --gpu 0 sample/ || error "imagenet example failed"
}

function language_translation() {
Expand Down