Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build light weight PyRuntime without llvm or onnx-mlir #3044

Merged
merged 15 commits into from
Jan 29, 2025
Merged
Prev Previous commit
Next Next commit
fix script
Signed-off-by: Chen Tong <chentong@us.ibm.com>
  • Loading branch information
chentong319 committed Jan 15, 2025
commit a92ccc2bb4f5035dc92624a5e65959e636b83490
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
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy