diff --git a/hpvm/projects/torch2hpvm/README.md b/hpvm/projects/torch2hpvm/README.md index 493ad26447b60afbd6e76885722dc7d9976e2fd7..1f06142f524b34760f1fffc84a5b2a2f07bf23a3 100644 --- a/hpvm/projects/torch2hpvm/README.md +++ b/hpvm/projects/torch2hpvm/README.md @@ -26,9 +26,9 @@ First, prepare 2 datasets for autotuning and testing. ```python 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 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) @@ -52,7 +52,7 @@ from torch.nn import Module import dnn # Defined at `hpvm/test/dnn_benchmarks/pytorch` 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)) ``` @@ -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. - Most ideally, create a high-level description of operators that can tie HPVM-C intrinsics and the frontend list of operators together. +