Skip to content

Fix messages about setting ONNX_MLIR_HOME #3157

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

Merged
merged 2 commits into from
May 13, 2025
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
4 changes: 2 additions & 2 deletions src/Runtime/python/onnxmlirdocker.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,8 @@ def getSession(self):
from PyRuntime import OMExecutionSession
except ImportError:
raise ImportError(
"Looks like you did not build the PyRuntime target, build it by running `make PyRuntime`."
"You may need to set ONNX_MLIR_HOME to `onnx-mlir/build/Debug` since `make PyRuntime` outputs to `build/Debug` by default"
"Looks like you did not build the PyRuntimeC target, build it by running `make PyRuntimeC`."
"You may need to set ONNX_MLIR_HOME to `onnx-mlir/build/Debug` since `make PyRuntimeC` outputs to `build/Debug` by default"
)

return OMExecutionSession(self.compiled_model, self.compile_tag)
Expand Down
6 changes: 3 additions & 3 deletions utils/RunONNXModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@
from PyRuntime import OMExecutionSession
except ImportError:
raise ImportError(
"Looks like you did not build the PyRuntime target, build it by running"
" `make PyRuntime`. You may need to set ONNX_MLIR_HOME to"
" `onnx-mlir/build/Debug` since `make PyRuntime` outputs to"
"Looks like you did not build the PyRuntimeC target, build it by running"
" `make PyRuntimeC`. You may need to set ONNX_MLIR_HOME to"
" `onnx-mlir/build/Debug` since `make PyRuntimeC` outputs to"
" `build/Debug` by default."
)

Expand Down
4 changes: 2 additions & 2 deletions utils/onnxmlirrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def __init__(self, model_path, target="cpu", **kwarg):
from PyRuntime import OMExecutionSession
except ImportError:
raise ImportError(
"Looks like you did not build the PyRuntime target, build it by running `make PyRuntime`.You may need to set ONNX_MLIR_HOME to `onnx-mlir/build/Debug` since `make PyRuntime` outputs to `build/Debug` by default"
"Looks like you did not build the PyRuntimeC target, build it by running `make PyRuntimeC`.You may need to set ONNX_MLIR_HOME to `onnx-mlir/build/Debug` since `make PyRuntimeC` outputs to `build/Debug` by default"
)
# Initialize status
self.compiled = False
Expand Down Expand Up @@ -121,7 +121,7 @@ def loadSession(self):
from PyRuntime import OMExecutionSession
except ImportError:
raise ImportError(
"Looks like you did not build the PyRuntime target, build it by running `make PyRuntime`.You may need to set ONNX_MLIR_HOME to `onnx-mlir/build/Debug` since `make PyRuntime` outputs to `build/Debug` by default"
"Looks like you did not build the PyRuntimeC target, build it by running `make PyRuntimeC`.You may need to set ONNX_MLIR_HOME to `onnx-mlir/build/Debug` since `make PyRuntimeC` outputs to `build/Debug` by default"
)

# Use the generated shared library to create an execution session.
Expand Down
4 changes: 2 additions & 2 deletions utils/python/transformers/run_gpt2_from_huggingface.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
from PyCompileAndRuntime import OMCompileExecutionSession
except ImportError:
raise ImportError(
"Looks like you did not build the PyRuntime target, build it by running `make PyRuntime`."
"You may need to set ONNX_MLIR_HOME to `onnx-mlir/build/Debug` since `make PyRuntime` outputs to `build/Debug` by default"
"Looks like you did not build the PyRuntimeC target, build it by running `make PyRuntimeC`."
"You may need to set ONNX_MLIR_HOME to `onnx-mlir/build/Debug` since `make PyRuntimeC` outputs to `build/Debug` by default"
)

# Information to download onnx models from HuggingFace.
Expand Down
Loading