Skip to content

Commit 2fe871c

Browse files
committed
code refacotr to backend/cuda and backend/aoti
1 parent 3b02829 commit 2fe871c

18 files changed

+12
-12
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ if(EXECUTORCH_BUILD_CUDA)
595595
# Build common AOTI functionality (required for CUDA)
596596
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/backends/aoti)
597597
# Build CUDA-specific AOTI functionality
598-
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/backends/aoti/cuda)
598+
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/backends/cuda)
599599
# Add aoti_cuda to backends - it already depends on aoti_common
600600
list(APPEND _executorch_backends aoti_cuda)
601601
endif()

backends/aoti/aoti_model_container.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
#pragma once
1010

11+
#include <executorch/backends/cuda/runtime/shims/memory.h>
1112
#include <executorch/extension/tensor/tensor.h>
1213
#include <executorch/runtime/core/error.h>
13-
#include "cuda/runtime/shims/memory.h"
1414

1515
namespace executorch {
1616
namespace backends {

backends/aoti/common_shims.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ AOTITorchError aoti_torch_get_storage_size(
106106
throw std::runtime_error("Cannot get storage size on ETensor");
107107
}
108108

109-
110109
AOTITorchError aoti_torch_get_device_index(
111110
AOTITensorHandle tensor,
112111
int32_t* ret_device_index) {

backends/aoti/utils.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ size_t dtype_to_element_size(int32_t dtype) {
3434
// Map int32_t dtype to ExecutorTorch ScalarType (robust version of hardcoded
3535
// ScalarType::Float)
3636
executorch::aten::ScalarType dtype_to_scalar_type(int32_t dtype) {
37-
// Convert based on known PyTorch dtype codes (without CUDA-specific dependency)
37+
// Convert based on known PyTorch dtype codes (without CUDA-specific
38+
// dependency)
3839
switch (dtype) {
3940
case 6: // PyTorch's float32 dtype code
4041
return executorch::aten::ScalarType::Float;

backends/aoti/utils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010

1111
#include <executorch/runtime/core/error.h>
1212
#include <executorch/runtime/core/exec_aten/exec_aten.h>
13-
#include <cstdint>
1413
#include <cstddef>
14+
#include <cstdint>
1515

1616
namespace executorch {
1717
namespace backends {

backends/aoti/cuda/CMakeLists.txt renamed to backends/cuda/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
1919

2020
# Source root directory for executorch.
2121
if(NOT EXECUTORCH_ROOT)
22-
set(EXECUTORCH_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../../..)
22+
set(EXECUTORCH_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../..)
2323
endif()
2424

2525
find_package(CUDAToolkit REQUIRED)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)