pti-gpu
pti-gpu copied to clipboard
[Unitrace] Build fail when CMake build dir is specified
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__":
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 Its part of Aurora Programming Environment deployment.
@servesh, We have merged the fix. Could you please confirm and close the issue?
@Sarbojit2019 Thanks.