Skip to content
Snippets Groups Projects
Commit d4ff8a06 authored by Hashim Sharif's avatar Hashim Sharif
Browse files

More torch2hpvm README Path fixes

parent 2d274ce2
No related branches found
No related tags found
No related merge requests found
...@@ -26,9 +26,9 @@ First, prepare 2 datasets for autotuning and testing. ...@@ -26,9 +26,9 @@ First, prepare 2 datasets for autotuning and testing.
```python ```python
from torch2hpvm import BinDataset from torch2hpvm import BinDataset
from pathlib import Path, PosixPath from pathlib import Path
data_dir = Path(__file__).parent / "model_params/resnet18_cifar10" data_dir = Path(__file__).parent / "../model_params/resnet18_cifar10"
dataset_shape = 5000, 3, 32, 32 dataset_shape = 5000, 3, 32, 32
tuneset = BinDataset(data_dir / "tune_input.bin", data_dir / "tune_labels.bin", dataset_shape) tuneset = BinDataset(data_dir / "tune_input.bin", data_dir / "tune_labels.bin", dataset_shape)
testset = BinDataset(data_dir / "test_input.bin", data_dir / "test_labels.bin", dataset_shape) testset = BinDataset(data_dir / "test_input.bin", data_dir / "test_labels.bin", dataset_shape)
...@@ -52,7 +52,7 @@ from torch.nn import Module ...@@ -52,7 +52,7 @@ from torch.nn import Module
import dnn # Defined at `hpvm/test/dnn_benchmarks/pytorch` import dnn # Defined at `hpvm/test/dnn_benchmarks/pytorch`
model: Module = dnn.ResNet18() model: Module = dnn.ResNet18()
checkpoint = Path(__file__).parent.absolute() / PosixPath("../model_params/resnet18_cifar10.pth.tar") checkpoint = Path(__file__).parent / "../model_params/resnet18_cifar10.pth.tar"
model.load_state_dict(torch.load(checkpoint)) model.load_state_dict(torch.load(checkpoint))
``` ```
...@@ -108,3 +108,4 @@ This choice of operators is largely constrained by backend (tensor_runtime) supp ...@@ -108,3 +108,4 @@ This choice of operators is largely constrained by backend (tensor_runtime) supp
1. Expand the list of operators supported in the frontend. 1. Expand the list of operators supported in the frontend.
- Most ideally, create a high-level description of operators that can tie - Most ideally, create a high-level description of operators that can tie
HPVM-C intrinsics and the frontend list of operators together. HPVM-C intrinsics and the frontend list of operators together.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment