This is an automated email from the ASF dual-hosted git repository.

tlopex pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/main by this push:
     new d291513131 [REFACTOR][VM] Move CUDA graph VM builtin back under VM 
runtime (#19758)
d291513131 is described below

commit d291513131b931cf7d5ff0617a307ac35e0d76ef
Author: Tianqi Chen <[email protected]>
AuthorDate: Sun Jun 14 00:08:00 2026 -0400

    [REFACTOR][VM] Move CUDA graph VM builtin back under VM runtime (#19758)
    
    CUDA graph VM support is Relax VM functionality, so it should stay with
    the VM runtime layout instead of living under the CUDA backend runtime
    tree introduced by the backend reorg.
    
    This moves the CUDA graph builtin back under src/runtime/vm/cuda and
    points the CUDA runtime CMake source glob at that VM-owned location
    while preserving the existing symbols and behavior.
---
 cmake/modules/CUDA.cmake                                            | 2 +-
 .../cuda/runtime/vm => runtime/vm/cuda}/cuda_graph_builtin.cc       | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/cmake/modules/CUDA.cmake b/cmake/modules/CUDA.cmake
index 53f4bf8d86..7a383aa0de 100644
--- a/cmake/modules/CUDA.cmake
+++ b/cmake/modules/CUDA.cmake
@@ -63,7 +63,7 @@ if(USE_CUDA)
   message(STATUS "Build cuda device runtime")
 
   tvm_file_glob(GLOB RUNTIME_CUDA_SRCS src/backend/cuda/runtime/*.cc)
-  tvm_file_glob(GLOB VM_CUDA_BUILTIN_SRC_CC src/backend/cuda/runtime/vm/*.cc)
+  tvm_file_glob(GLOB VM_CUDA_BUILTIN_SRC_CC src/runtime/vm/cuda/*.cc)
 
   add_library(tvm_runtime_cuda_objs OBJECT ${RUNTIME_CUDA_SRCS} 
${VM_CUDA_BUILTIN_SRC_CC})
   target_link_libraries(tvm_runtime_cuda_objs PUBLIC tvm_ffi_header)
diff --git a/src/backend/cuda/runtime/vm/cuda_graph_builtin.cc 
b/src/runtime/vm/cuda/cuda_graph_builtin.cc
similarity index 98%
rename from src/backend/cuda/runtime/vm/cuda_graph_builtin.cc
rename to src/runtime/vm/cuda/cuda_graph_builtin.cc
index 6d60042b19..58348fb695 100644
--- a/src/backend/cuda/runtime/vm/cuda_graph_builtin.cc
+++ b/src/runtime/vm/cuda/cuda_graph_builtin.cc
@@ -18,7 +18,7 @@
  */
 
 /*!
- * \file src/runtime/vm/cuda_graph_builtin.cc
+ * \file src/runtime/vm/cuda/cuda_graph_builtin.cc
  * \brief The CUDA graph related builtin functions for Relax virtual machine.
  */
 
@@ -28,8 +28,8 @@
 #include <tvm/ffi/reflection/registry.h>
 #include <tvm/runtime/vm/vm.h>
 
-#include "../../../../support/utils.h"
-#include "../cuda_common.h"
+#include "../../../backend/cuda/runtime/cuda_common.h"
+#include "../../../support/utils.h"
 namespace tvm {
 namespace runtime {
 namespace vm {

Reply via email to