Description
Describe the documentation issue
I'm trying to build off a branch for reintroducing OpenCL as an EP, but I'm having a hard time getting testing to work for individual tests. The build process completed fine, but trying to run a test file like so: python onnxruntime/test/python/onnxruntime_test_python.py
Initially the problem is the *.so
files needed are only found in build/Linux/Debug
, but running the test from that directory also seems to have issues finding relevant *.onnx
files. Using find, I know they exist:
~/repos/onnxruntime$ find . -name "custom_op_test.onnx"
./onnxruntime/test/testdata/custom_op_library/custom_op_test.onnx
./build/Linux/Debug/testdata/custom_op_library/custom_op_test.onnx
But the test seems to be looking for these files in a slightly different path:
======================================================================
ERROR: test_register_custom_ops_library (__main__.TestInferenceSession.test_register_custom_ops_library)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/mitchell/repos/onnxruntime/build/Linux/Debug/../../../onnxruntime/test/python/onnxruntime_test_python.py", line 1327, in test_register_custom_ops_library
raise FileNotFoundError(f"Unable to find '{custom_op_model}'")
FileNotFoundError: Unable to find '/home/mitchell/repos/onnxruntime/build/Linux/Debug/../../../onnxruntime/test/python/testdata/custom_op_library/custom_op_test.onnx'
----------------------------------------------------------------------
I'm assuming I am just running the test incorrectly, but couldn't find how the tests should be ran properly on an individual basis. From the documentation at (https://onnxruntime.ai/docs/build/inferencing.html):
The build script runs all unit tests by default for native builds and skips tests by default for cross-compiled builds. To skip the tests, run with --build or --update --build.
However, is there a proper way to just run an individual test file for development?
Page / URL
No response