tqchen opened a new pull request, #19621:
URL: https://github.com/apache/tvm/pull/19621

   ## Summary
   
   Move `include/tvm/runtime/nvtx.h` to `include/tvm/support/cuda/nvtx.h` under 
namespace `tvm::support`, delete `src/runtime/nvtx.cc`, and inline the two 
trivial constructor/destructor bodies so the header is header-only. No FFI 
registrations or static state to relocate; the .cc was a pure RAII wrapper.
   
   The CMake `TVM_NVTX_ENABLED=1` gate moves from a per-file 
`set_source_files_properties` on `nvtx.cc` (now gone) to a target-wide 
`add_compile_definitions` inside the same `if(USE_CUDA AND USE_NVTX)` block, so 
every TU that includes the inline header agrees on the definition.
   
   ## Files
   
   - create: `include/tvm/support/cuda/nvtx.h`
   - delete: `include/tvm/runtime/nvtx.h`, `src/runtime/nvtx.cc`
   - modify: `CMakeLists.txt`, `src/runtime/vm/attn_utils.h`, 
`src/runtime/vm/paged_kv_cache.cc`, `src/runtime/vm/vm.cc`
   
   ## Test plan
   
   - [x] Default build (`USE_NVTX=OFF`) — full `ninja` succeeds; no undefined 
references to `NVTXScopedRange`.
   - [x] `ninja cpptest` — 118/118 passed.
   - [x] Python smoke: `import tvm; tvm.cuda(0).exist` — True.
   - [x] `pre-commit run --all-files` — all hooks passed (clang-format 
reformatted and re-verified clean).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to