Skip to content

Commit 132c342

Browse files
committed
slim tensor supported
1 parent 61a136a commit 132c342

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+6020
-6623
lines changed

backends/cuda/CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,7 @@ install(
7070
# CUDA-specific AOTI functionality
7171
set(_aoti_cuda_sources
7272
runtime/cuda_backend.cpp
73-
runtime/common_shims.cpp
74-
runtime/shims/memory.cpp
75-
runtime/shims/tensor_attribute.cpp
7673
runtime/guard.cpp
77-
runtime/shims/cuda_guard.cpp
78-
runtime/shims/int4mm.cu
7974
runtime/platform/platform.cpp
8075
)
8176
add_library(aoti_cuda STATIC ${_aoti_cuda_sources})

backends/cuda/runtime/TARGETS

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,9 @@ runtime.cxx_library(
5050
name = "runtime_shims",
5151
srcs = [
5252
"guard.cpp",
53-
"shims/cuda_guard.cpp",
54-
"shims/int4mm.cu",
55-
"shims/memory.cpp",
56-
"shims/tensor_attribute.cpp",
5753
],
5854
headers = [
5955
"guard.h",
60-
"shims/cuda_guard.h",
61-
"shims/int4mm.cuh",
62-
"shims/int4mm.h",
63-
"shims/memory.h",
64-
"shims/tensor_attribute.h",
6556
"utils.h",
6657
],
6758
# @lint-ignore BUCKLINT: Avoid `link_whole=True` (https://fburl.com/avoid-link-whole)
@@ -72,7 +63,6 @@ runtime.cxx_library(
7263
visibility = ["@EXECUTORCH_CLIENTS"],
7364
deps = [
7465
":tensor_maker",
75-
"//executorch/backends/aoti:common_shims",
7666
"//executorch/runtime/core:core",
7767
"//executorch/runtime/core/exec_aten:lib",
7868
"//executorch/runtime/platform:platform",
@@ -100,7 +90,6 @@ runtime.cxx_library(
10090
visibility = ["@EXECUTORCH_CLIENTS"],
10191
deps = [
10292
":runtime_shims",
103-
"//executorch/backends/aoti:aoti_common",
10493
"//executorch/runtime/backend:interface",
10594
"//executorch/runtime/core/exec_aten/util:tensor_util",
10695
],

backends/cuda/runtime/aoti_delegate_handle.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
#include <executorch/runtime/core/error.h>
1212
#include <executorch/runtime/core/evalue.h>
13+
#include <executorch/backends/cuda/runtime/slim/core/SlimTensor.h>
1314

1415
namespace executorch {
1516
namespace backends {
@@ -21,7 +22,7 @@ using executorch::runtime::etensor::Tensor;
2122
extern "C" {
2223

2324
// Type definitions
24-
using AOTITensorHandle = Tensor*;
25+
using AOTITensorHandle = standalone::slim::SlimTensor*;
2526
using AOTIRuntimeError = Error;
2627

2728
// Forward declarations for AOT Inductor model container
@@ -50,12 +51,12 @@ using AOTInductorModelContainerGetNumOutputsFunc = AOTIRuntimeError (*)(
5051

5152
using AOTInductorModelContainerRunFunc = AOTIRuntimeError (*)(
5253
AOTInductorModelContainerHandle container_handle,
53-
Tensor** input_handles, // array of input Tensor*; handles
54-
// are stolen; the array itself is borrowed
54+
AOTITensorHandle* input_handles, // array of input SlimTensor*; handles
55+
// are stolen; the array itself is borrowed
5556
size_t num_inputs,
56-
Tensor** output_handles, // array for writing output Tensor*; handles
57-
// will be stolen by the caller; the array itself
58-
// is borrowed
57+
AOTITensorHandle* output_handles, // array for writing SlimTensor*; handles
58+
// will be stolen by the caller; the array itself
59+
// is borrowed
5960
size_t n_outputs,
6061
AOTInductorStreamHandle stream_handle,
6162
AOTIProxyExecutorHandle proxy_executor_handle);

backends/cuda/runtime/common_shims.cpp

Lines changed: 0 additions & 211 deletions
This file was deleted.

backends/cuda/runtime/common_shims.h

Lines changed: 0 additions & 82 deletions
This file was deleted.

0 commit comments

Comments
 (0)