Skip to content

Commit

Permalink
fix script
Browse files Browse the repository at this point in the history
Signed-off-by: Chen Tong <[email protected]>
  • Loading branch information
chentong319 committed Jan 15, 2025
1 parent 28584dd commit a92ccc2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
8 changes: 6 additions & 2 deletions docs/BuildPyRuntimeLit.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,12 @@ make
make OMCreatePyRuntimePackage
# Install the package
pip3 install src/Runtime/python/onnxmlir
pip3 install -e src/Runtime/python/onnxmlir
# -e is necessary for current package. Need to add resource description
# to install the pre-compiled binary
# Run test case
python3 src/Runtime/python/onnxmlir/test/test_1.py
cd src/Runtime/python/onnxmlir/tests
python3 test_1.py
# Current limitation on where the model is
```
2 changes: 1 addition & 1 deletion src/Runtime/python/onnxmlirdocker.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def __init__(self, model_path, **kwargs):
self.model_basename.removesuffix(model_suffix),
)

print("model: ", self.model_dirname)
self.container_client = docker.from_env()
# Logically, the model directory could be mounted as read only.
# But wrong time error occurred with "r" mode
Expand All @@ -91,7 +92,6 @@ def __init__(self, model_path, **kwargs):
},
},
)
print("afterwards tempdir: ", [f for f in os.listdir(self.output_dirname)])
self.session = self.getSession()

def getSession(self):
Expand Down
8 changes: 6 additions & 2 deletions utils/build-pyruntime-lit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ make
make OMCreatePyRuntimePackage

# Install the package
pip3 install src/Runtime/python/onnxmlir
pip3 install -e src/Runtime/python/onnxmlir
# -e is necessary for current package. Need to add resource description
# to install the pre-compiled binary

# Run test case
python3 src/Runtime/python/onnxmlir/test/test_1.py
cd src/Runtime/python/onnxmlir/tests
python3 test_1.py
# Current limitation on where the model is

0 comments on commit a92ccc2

Please sign in to comment.