Skip to content

Commit

Permalink
Fix DALI TF plugin source compilation during installation (#5448)
Browse files Browse the repository at this point in the history
- removes unnecessary escape characters from compilation commands
  for the DALI TF plugin stub and binary issues when the
  plugin is built from the source during installation. Before
  this change rpatch was incorrectly set to '$ORIGIN' instead
  of just $ORIGIN

Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
  • Loading branch information
JanuszL committed Apr 30, 2024
1 parent bd57d59 commit 80b67f9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dali_tf_plugin/dali_tf_plugin_install_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ def build(self):
dali_lflags = "-L" + tmpdir + " -ldali"
dali_cflags = "-I" + os.path.join(self.src_path, "include")

cmd = [compiler, "-Wl,-R,'$ORIGIN/..'", "-std=c++14", "-DNDEBUG", "-shared"]
cmd = [compiler, "-Wl,-R,$ORIGIN/..", "-std=c++14", "-DNDEBUG", "-shared"]
cmd += dali_stub_src.split()
cmd += ["-o"]
cmd += dali_stub_lib.split()
Expand Down Expand Up @@ -374,8 +374,8 @@ def build(self):
root_include = "-I" + os.getenv("PREFIX", default="/usr") + "/include"
cmd = [
compiler,
"-Wl,-R,'$ORIGIN/..'",
"-Wl,-rpath,'$ORIGIN'",
"-Wl,-R,$ORIGIN/..",
"-Wl,-rpath,$ORIGIN",
cpp_ver,
"-DNDEBUG",
"-shared",
Expand Down
8 changes: 8 additions & 0 deletions qa/TL0_tensorflow_plugin/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ test_body() {
pip install ../../../nvidia-dali-tf-plugin*.tar.gz
${python_invoke_test} test_dali_tf_plugin.py:TestDaliTfPluginLoadOk

# Installing "current" dali tf (built against installed TF) - force rebuild without DALI using internal stubs
# and then install DALI again
pip uninstall -y `pip list | grep nvidia-dali-tf-plugin | cut -d " " -f1` || true
pip uninstall -y `pip list | grep nvidia-dali | cut -d " " -f1` || true
DALI_TF_ALWAYS_BUILD=1 pip install --no-deps ../../../nvidia-dali-tf-plugin*.tar.gz
pip install ../../../nvidia_dali_*.whl
${python_invoke_test} test_dali_tf_plugin.py:TestDaliTfPluginLoadOk

# DALI TF run
${python_invoke_test} test_dali_tf_plugin_run.py

Expand Down

0 comments on commit 80b67f9

Please sign in to comment.