Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions backends/cuda/runtime/cuda_backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@
#include <executorch/backends/cuda/runtime/shims/memory.h>
#include <executorch/backends/cuda/runtime/utils.h>

namespace executorch {
namespace backends {
namespace cuda {
namespace executorch::backends::cuda {

#define LOAD_SYMBOL(name, handle) \
do { \
Expand Down Expand Up @@ -335,14 +333,13 @@ class ET_EXPERIMENTAL CudaBackend final
}
};

} // namespace cuda
} // namespace executorch::backends::cuda

namespace executorch::backends {
namespace {
auto cls = cuda::CudaBackend();
executorch::runtime::Backend backend{"CudaBackend", &cls};
static executorch::runtime::Error success_with_compiler =
register_backend(backend);
} // namespace

} // namespace backends
} // namespace executorch
} // namespace executorch::backends
8 changes: 2 additions & 6 deletions backends/cuda/runtime/guard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
#include <executorch/backends/cuda/runtime/guard.h>
#include <executorch/runtime/platform/log.h>

namespace executorch {
namespace backends {
namespace cuda {
namespace executorch::backends::cuda {

namespace {
// Thread-local stream storage (private to this file)
Expand Down Expand Up @@ -146,6 +144,4 @@ Result<CUDAStreamGuard> CUDAStreamGuard::create(
return stream_guard;
}

} // namespace cuda
} // namespace backends
} // namespace executorch
} // namespace executorch::backends::cuda
8 changes: 2 additions & 6 deletions backends/cuda/runtime/guard.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
#include <executorch/runtime/core/result.h>
#include <cstdint>

namespace executorch {
namespace backends {
namespace cuda {
namespace executorch::backends::cuda {

using executorch::runtime::Error;
using executorch::runtime::Result;
Expand Down Expand Up @@ -190,6 +188,4 @@ class CUDAStreamGuard {
DeviceIndex device_index_;
};

} // namespace cuda
} // namespace backends
} // namespace executorch
} // namespace executorch::backends::cuda
8 changes: 2 additions & 6 deletions backends/cuda/runtime/shims/cuda_guard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@

#include <executorch/backends/cuda/runtime/shims/cuda_guard.h>

namespace executorch {
namespace backends {
namespace cuda {
namespace executorch::backends::cuda {

extern "C" {

Expand Down Expand Up @@ -104,6 +102,4 @@ AOTITorchError aoti_torch_get_current_cuda_stream(

} // extern "C"

} // namespace cuda
} // namespace backends
} // namespace executorch
} // namespace executorch::backends::cuda
8 changes: 2 additions & 6 deletions backends/cuda/runtime/shims/cuda_guard.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
#include <executorch/backends/cuda/runtime/guard.h>
#include <cstdint>

namespace executorch {
namespace backends {
namespace cuda {
namespace executorch::backends::cuda {

using executorch::backends::aoti::AOTITorchError;

Expand Down Expand Up @@ -99,6 +97,4 @@ AOTITorchError aoti_torch_get_current_cuda_stream(

} // extern "C"

} // namespace cuda
} // namespace backends
} // namespace executorch
} // namespace executorch::backends::cuda
8 changes: 2 additions & 6 deletions backends/cuda/runtime/shims/memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@
#include <unordered_set>
#include <vector>

namespace executorch {
namespace backends {
namespace cuda {
namespace executorch::backends::cuda {

using executorch::aten::SizesType;
using executorch::aten::StridesType;
Expand Down Expand Up @@ -659,6 +657,4 @@ AOTITorchError aoti_torch__reinterpret_tensor(

} // extern "C"

} // namespace cuda
} // namespace backends
} // namespace executorch
} // namespace executorch::backends::cuda
8 changes: 2 additions & 6 deletions backends/cuda/runtime/shims/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
#include <executorch/backends/aoti/common_shims.h>
#include <cstdint>

namespace executorch {
namespace backends {
namespace cuda {
namespace executorch::backends::cuda {

using executorch::backends::aoti::AOTITorchError;
using executorch::backends::aoti::Tensor;
Expand Down Expand Up @@ -145,6 +143,4 @@ aoti_torch_copy_(Tensor* self, Tensor* src, int32_t non_blocking);
void clear_all_tensors();
} // extern "C"

} // namespace cuda
} // namespace backends
} // namespace executorch
} // namespace executorch::backends::cuda
8 changes: 2 additions & 6 deletions backends/cuda/runtime/shims/tensor_attribute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@

#include <executorch/backends/cuda/runtime/shims/tensor_attribute.h>

namespace executorch {
namespace backends {
namespace cuda {
namespace executorch::backends::cuda {

extern "C" {

Expand All @@ -31,6 +29,4 @@ int32_t aoti_torch_device_type_cuda() {

} // extern "C"

} // namespace cuda
} // namespace backends
} // namespace executorch
} // namespace executorch::backends::cuda
8 changes: 2 additions & 6 deletions backends/cuda/runtime/shims/tensor_attribute.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
#include <executorch/runtime/core/error.h>
#include <cstdint>

namespace executorch {
namespace backends {
namespace cuda {
namespace executorch::backends::cuda {

// Common using declarations for ExecutorTorch types
using executorch::runtime::Error;
Expand All @@ -35,6 +33,4 @@ int32_t aoti_torch_device_type_cuda();

} // extern "C"

} // namespace cuda
} // namespace backends
} // namespace executorch
} // namespace executorch::backends::cuda
8 changes: 2 additions & 6 deletions backends/cuda/runtime/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@
#define ET_CUDA_KERNEL_LAUNCH_CHECK_OR_RETURN_ERROR() \
ET_CUDA_CHECK_OR_RETURN_ERROR(cudaGetLastError())

namespace executorch {
namespace backends {
namespace cuda {
namespace executorch::backends::cuda {

// Enum for supported data types in et-cuda backend
enum class SupportedDTypes : int32_t {
Expand Down Expand Up @@ -125,6 +123,4 @@ inline AOTITorchError validate_dtype(int32_t dtype) {
}
} // extern "C"

} // namespace cuda
} // namespace backends
} // namespace executorch
} // namespace executorch::backends::cuda
Loading