Skip to content

Commit

Permalink
[Hexgaon] Use uploaded path to load module. (tlc-pack#238)
Browse files Browse the repository at this point in the history
* Fixes a bug to use the uploaded file remote path for loading the module
remotely.

* Modifies the task_python_hexagon.sh script to only run passing test
on device. This is used by Jenkins CI.
  • Loading branch information
psrivas2 authored and junrushao committed Jan 26, 2023
1 parent 3ebddca commit cfb9dc4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
4 changes: 2 additions & 2 deletions python/tvm/contrib/hexagon/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,8 +382,8 @@ def _relax_vm_executable_executor(
hexagon_arch="v68",
)

self.upload(path_exec, "exec.so")
return self._rpc.get_function("tvm.hexagon.load_module")("exec.so")
path = self.upload(path_exec, "exec.so")
return self._rpc.get_function("tvm.hexagon.load_module")(str(path))

def _aot_executor_from_factory(
self,
Expand Down
9 changes: 8 additions & 1 deletion tests/scripts/task_python_hexagon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,14 @@ fi
export ANDROID_SERIAL_NUMBER=${device_serial}

# Only test integration with Relax
run_pytest ctypes python-contrib-hexagon tests/python/contrib/test_hexagon/test_relax_integration.py
# TODO(prakalp): Run the same tests on simulator and device once the bug with device is fixed.
if [[ "${device_serial}" == "simulator" ]];
then
run_pytest ctypes python-contrib-hexagon tests/python/contrib/test_hexagon/test_relax_integration.py
else
run_pytest ctypes python-contrib-hexagon tests/python/contrib/test_hexagon/test_relax_integration.py::test_conv2d
fi


if [[ "${device_serial}" == "simulator" ]]; then
kill ${TRACKER_PID}
Expand Down

0 comments on commit cfb9dc4

Please sign in to comment.