-
Notifications
You must be signed in to change notification settings - Fork 39
Best Practice in development
huiyan2021 edited this page May 20, 2025
·
2 revisions
- When you develop on a branch, use
rebase
instead ofmerge
becausemerge
may flood the actual new commits onmain
branch.
- Pick PR: https://github.com/intel/torch-xpu-ops/pull/1671 at the time being.
- Build debug version of pytorch:
- export DEBUG=1
- export BUILD_SEPARATE_OPS=ON (https://github.com/intel/torch-xpu-ops/blob/main/CMakeLists.txt#L92)
- python setup.py develop 2>&1 | tee build.log
- Mixed Language Debugging (Python and C++) or Python C++ Debugger, both work.
- Fix gdb attach permission issue: Superuser access is required to attach to a process. Attaching as superuser can potentially harm your computer. Do you want to continue? [y/N]
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
-
launch.json
-
break point in python script
-
break point in c++ code