Skip to content

Commit 9be5ea8

Browse files
committed
Update on "Use generated files in module test"
Instead of checking in the PTE/PTD files. This helps us keep up to date with aot changes, especially with incoming flat_tensor refactor. Main changes here are with the model. Instead of using AddModule from examples/portable, use ModuleAdd from test/models/export_program, like our other tests. There is a shape difference (1 tensor vs 2 tensors+alpha), so we have to change all the inputs. Differential Revision: [D73470865](https://our.internmc.facebook.com/intern/diff/D73470865/) [ghstack-poisoned]
2 parents 258e588 + 446bf17 commit 9be5ea8

File tree

2 files changed

+0
-5
lines changed

2 files changed

+0
-5
lines changed

extension/module/test/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ add_custom_command(
2929
COMMAND
3030
python3 -m test.models.export_program --modules "ModuleLinear"
3131
--external-constants --outdir "${CMAKE_CURRENT_BINARY_DIR}" 2> /dev/null
32-
WORKING_DIRECTORY ${EXECUTORCH_ROOT}
3332
)
3433

3534
add_custom_target(

extension/module/test/module_test.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ using namespace ::executorch::runtime;
2323
class ModuleTest : public ::testing::Test {
2424
protected:
2525
static void SetUpTestSuite() {
26-
std::string resources_path;
27-
if (const char* env = std::getenv("RESOURCES_PATH")) {
28-
resources_path = env;
29-
}
3026
model_path_ = std::getenv("ET_MODULE_ADD_PATH");
3127
linear_path_ = std::getenv("ET_MODULE_LINEAR_PROGRAM_PATH");
3228
linear_data_path_ = std::getenv("ET_MODULE_LINEAR_DATA_PATH");

0 commit comments

Comments
 (0)