pti-gpu icon indicating copy to clipboard operation
pti-gpu copied to clipboard

[Unitrace] Build fail when CMake build dir is specified

Open servesh opened this issue 7 months ago • 2 comments

When building with CMake build directory passed to command line,

 cmake -Bbuild -H. -DCMAKE_BUILD_TYPE=Release

The get_itt.py fails to build,

Traceback (most recent call last):
  File "/tmp/pti-gpu/tools/unitrace/scripts/get_itt.py", line 81, in <module>
    main()
  File "/tmp/pti-gpu/tools/unitrace/scripts/get_itt.py", line 79, in main
    build()
  File "/tmp/pti-gpu/tools/unitrace/scripts/get_itt.py", line 34, in build
    os.chdir(itt_dir)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pti-gpu/tools/unitrace/ittapi'

A simple patch such as below addresses the issue,

diff --git a/tools/unitrace/scripts/get_itt.py b/tools/unitrace/scripts/get_itt.py
index 430cf1f..1ca377e 100644
--- a/tools/unitrace/scripts/get_itt.py
+++ b/tools/unitrace/scripts/get_itt.py
@@ -75,6 +75,7 @@ def main():
   src_path = os.path.join(src_path, "legacy")
   copy(src_path, dst_path, ["ittnotify.h"])

+  os.chdir(sys.argv[2])
   # build ittnotify
   build()
 if __name__ == "__main__":

servesh avatar Apr 26 '25 19:04 servesh

Thanks for reporting the issue, we will fix it in next release. Let me know for what purpose you are planning to use the tool.

Sarbojit2019 avatar Apr 28 '25 07:04 Sarbojit2019

@Sarbojit2019 Its part of Aurora Programming Environment deployment.

servesh avatar Apr 28 '25 16:04 servesh

@servesh, We have merged the fix. Could you please confirm and close the issue?

Sarbojit2019 avatar Jul 14 '25 03:07 Sarbojit2019

@Sarbojit2019 Thanks.

servesh avatar Jul 15 '25 16:07 servesh