Skip to content

Commit 097d7d4

Browse files
committed
Revert D76405701
This diff reverts D76405701 Depends on D76632995 (The context such as a Sandcastle job, Task, SEV, etc. was not provided.) Depends on D76405701 Differential Revision: [D76633014](https://our.internmc.facebook.com/intern/diff/D76633014/) ghstack-source-id: 290750934 Pull Request resolved: #11736
1 parent 057558f commit 097d7d4

File tree

5 files changed

+4
-36
lines changed

5 files changed

+4
-36
lines changed

extension/module/bundled_module.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ std::unique_ptr<BufferDataLoader> program_data_loader(
2727
}
2828
} // namespace
2929

30-
namespace ET_BUNDLED_MODULE_NAMESPACE {
31-
3230
BundledModule::BundledModule(
3331
const void* bundled_program_ptr,
3432
std::unique_ptr<runtime::MemoryAllocator> memory_allocator,
@@ -109,6 +107,6 @@ runtime::Error BundledModule::verify_method_outputs(
109107
return executorch::BUNDLED_PROGRAM_NAMESPACE::verify_method_outputs(
110108
*method, bundled_program_ptr_, testset_idx, rtol, atol);
111109
}
112-
} // namespace ET_BUNDLED_MODULE_NAMESPACE
110+
113111
} // namespace extension
114112
} // namespace executorch

extension/module/bundled_module.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,9 @@
1010

1111
#include <executorch/extension/module/module.h>
1212

13-
#ifdef USE_ATEN_LIB
14-
#define ET_BUNDLED_MODULE_NAMESPACE bundled_module::aten
15-
#else // !USE_ATEN_LIB
16-
#define ET_BUNDLED_MODULE_NAMESPACE bundled_module
17-
#endif // USE_ATEN_LIB
18-
1913
namespace executorch {
2014
namespace extension {
2115

22-
using ET_MODULE_NAMESPACE::Module;
23-
24-
namespace ET_BUNDLED_MODULE_NAMESPACE {
25-
2616
/**
2717
* A facade class for loading bundled programs and executing methods within
2818
* them.
@@ -129,6 +119,5 @@ class BundledModule : public Module {
129119
bool is_loaded_from_file_ = false;
130120
};
131121

132-
} // namespace ET_BUNDLED_MODULE_NAMESPACE
133122
} // namespace extension
134123
} // namespace executorch

extension/module/module.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636

3737
namespace executorch {
3838
namespace extension {
39-
namespace ET_MODULE_NAMESPACE {
4039

4140
using ET_RUNTIME_NAMESPACE::MethodMeta;
4241
using ET_RUNTIME_NAMESPACE::Program;
@@ -309,6 +308,5 @@ runtime::Error Module::set_output(
309308
output_tensor.mutable_data_ptr(), output_tensor.nbytes(), output_index);
310309
}
311310

312-
} // namespace ET_MODULE_NAMESPACE
313311
} // namespace extension
314312
} // namespace executorch

extension/module/module.h

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@
1616

1717
#include <executorch/runtime/executor/program.h>
1818

19-
#ifdef USE_ATEN_LIB
20-
#define ET_MODULE_NAMESPACE module::aten
21-
#else // !USE_ATEN_LIB
22-
#define ET_MODULE_NAMESPACE module
23-
#endif // USE_ATEN_LIB
24-
2519
namespace executorch {
2620
namespace extension {
2721

@@ -30,9 +24,6 @@ using ET_RUNTIME_NAMESPACE::MethodMeta;
3024
using ET_RUNTIME_NAMESPACE::NamedDataMap;
3125
using ET_RUNTIME_NAMESPACE::Program;
3226

33-
class ExecuTorchJni;
34-
35-
namespace ET_MODULE_NAMESPACE {
3627
/**
3728
* A facade class for loading programs and executing methods within them.
3829
*/
@@ -508,24 +499,16 @@ class Module {
508499
protected:
509500
std::unordered_map<std::string, MethodHolder> methods_;
510501

511-
friend class executorch::extension::ExecuTorchJni;
502+
friend class ExecuTorchJni;
512503
};
513504

514-
} // namespace ET_MODULE_NAMESPACE
515505
} // namespace extension
516506
} // namespace executorch
517507

518508
namespace torch {
519509
namespace executor {
520510
// TODO(T197294990): Remove these deprecated aliases once all users have moved
521511
// to the new `::executorch` namespaces.
522-
using ::executorch::extension::ET_MODULE_NAMESPACE::Module;
512+
using ::executorch::extension::Module;
523513
} // namespace executor
524514
} // namespace torch
525-
526-
namespace executorch {
527-
namespace extension {
528-
// backward compatible namespace alias
529-
using ::executorch::extension::ET_MODULE_NAMESPACE::Module;
530-
} // namespace extension
531-
} // namespace executorch

extension/module/test/bundled_module_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#include <executorch/extension/module/bundled_module.h>
1010
#include <gtest/gtest.h>
1111

12-
using namespace ::executorch::extension::ET_BUNDLED_MODULE_NAMESPACE;
12+
using namespace ::executorch::extension;
1313
using namespace ::executorch::runtime;
1414

1515
class BundledModuleTest : public ::testing::Test {

0 commit comments

Comments
 (0)