Skip to content

Commit

Permalink
[ESI Runtime] Fixing tests and in-tree builds
Browse files Browse the repository at this point in the history
RPATH wasn't effective for CIRCT-rooted builds, leading to test and stub
generation failures. Also, one of the tests wasn't updated to a new
name.
  • Loading branch information
teqdruid committed Jul 25, 2024
1 parent 6829bc1 commit 96b6a63
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion integration_test/Dialect/ESI/runtime/loopback.mlir.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
platform = sys.argv[1]
acc = esiaccel.AcceleratorConnection(platform, sys.argv[2])

hostmem = acc.get_host_memory()
hostmem = acc.get_service_hostmem()
if hostmem is not None:
mem1 = hostmem.allocate(1024)
assert mem1.size == 1024
Expand Down
7 changes: 4 additions & 3 deletions lib/Dialect/ESI/runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED YES)
set(CMAKE_INSTALL_RPATH "$ORIGIN/../lib")
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)
set(CMAKE_BUILD_RPATH "$ORIGIN/../lib")
set(CMAKE_BUILD_RPATH
"${CMAKE_BUILD_RPATH}:${CMAKE_BINARY_DIR}/lib:$ORIGIN/../lib")

# JSON parser for the manifest.
if (NOT TARGET nlohmann_json)
Expand Down Expand Up @@ -274,10 +275,10 @@ if(Python3_FOUND)
add_custom_command(
TARGET esiCppAccel
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E env "PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}"
COMMAND ${CMAKE_COMMAND} -E env "PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}/python"
python -m pybind11_stubgen
-o "${CMAKE_CURRENT_BINARY_DIR}/python/esiaccel"
esiCppAccel
esiaccel.esiCppAccel
)
else()
message(STATUS "pybind11_stubgen not found. Skipping stub generation.")
Expand Down

0 comments on commit 96b6a63

Please sign in to comment.