Vscode运行调试配置的一些记录。
Python
{
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": false
// set env variable
},
{
"name": "test",
"type": "python",
"request": "launch",
"program": "/home/yhao24/ml_scripts/inductor/test.py",
"console": "integratedTerminal",
"justMyCode": false,
// set env variable
"env": {
"TORCH_COMPILE_DEBUG": "1"
}
},
]
}
CUDA
tasks.json
{
"version": "2.0.0",
"tasks": [
{
"label": "build CUDA",
"type": "shell",
"command": "/scratch/opt/cuda-12.1/bin/nvcc",
"args": [
"-g",
"-G",
"-o",
"${workspaceFolder}/gpupunk/gpu-patch/test",
"-I${workspaceFolder}/gpupunk/gpu-patch/include",
"${workspaceFolder}/gpupunk/gpu-patch/src/test.cu"
],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "CUDA C++: Attach",
"type": "cuda-gdb",
"request": "launch",
"program": "${workspaceFolder}/gpupunk/gpu-patch/test",
"debuggerPath": "/scratch/opt/cuda-12.1/bin/cuda-gdb",
"preLaunchTask": "build CUDA"
}
]
}
Comments