diff --git a/examples/bundled_executor_runner/bundled_executor_runner.cpp b/examples/bundled_executor_runner/bundled_executor_runner.cpp index 044d919dad6..c1c85faaf50 100644 --- a/examples/bundled_executor_runner/bundled_executor_runner.cpp +++ b/examples/bundled_executor_runner/bundled_executor_runner.cpp @@ -76,9 +76,9 @@ int main(int argc, char** argv) { // DataLoaders that use mmap() or point to data that's already in memory, and // users can create their own DataLoaders to load from arbitrary sources. const char* model_path = FLAGS_model_path.c_str(); - Result loader = FileDataLoader::From(model_path); + Result loader = FileDataLoader::from(model_path); ET_CHECK_MSG( - loader.ok(), "FileDataLoader::From() failed: 0x%" PRIx32, loader.error()); + loader.ok(), "FileDataLoader::from() failed: 0x%" PRIx32, loader.error()); // Read in the entire file. Result file_data = loader->Load(0, loader->size().get()); diff --git a/examples/executor_runner/executor_runner.cpp b/examples/executor_runner/executor_runner.cpp index a40ec498388..4829c5f45e3 100644 --- a/examples/executor_runner/executor_runner.cpp +++ b/examples/executor_runner/executor_runner.cpp @@ -61,9 +61,9 @@ int main(int argc, char** argv) { // DataLoaders that use mmap() or point to data that's already in memory, and // users can create their own DataLoaders to load from arbitrary sources. const char* model_path = FLAGS_model_path.c_str(); - Result loader = FileDataLoader::From(model_path); + Result loader = FileDataLoader::from(model_path); ET_CHECK_MSG( - loader.ok(), "FileDataLoader::From() failed: 0x%" PRIx32, loader.error()); + loader.ok(), "FileDataLoader::from() failed: 0x%" PRIx32, loader.error()); // Parse the program file. This is immutable, and can also be reused between // multiple execution invocations across multiple threads. diff --git a/runtime/executor/test/allocation_failure_stress_test.cpp b/runtime/executor/test/allocation_failure_stress_test.cpp index 0f583548d80..fa039971763 100644 --- a/runtime/executor/test/allocation_failure_stress_test.cpp +++ b/runtime/executor/test/allocation_failure_stress_test.cpp @@ -41,7 +41,7 @@ class AllocationFailureStressTest : public ::testing::Test { void SetUp() override { // Create a loader for the serialized ModuleAdd program. const char* path = std::getenv("ET_MODULE_ADD_PATH"); - Result loader = FileDataLoader::From(path); + Result loader = FileDataLoader::from(path); ASSERT_EQ(loader.error(), Error::Ok); loader_ = std::make_unique(std::move(loader.get())); diff --git a/runtime/executor/test/backend_integration_test.cpp b/runtime/executor/test/backend_integration_test.cpp index 965047f8ef2..55e0c622ed6 100644 --- a/runtime/executor/test/backend_integration_test.cpp +++ b/runtime/executor/test/backend_integration_test.cpp @@ -292,7 +292,7 @@ TEST_P(BackendIntegrationTest, BackendIsPresent) { // Demonstrate that installed StubBackend initializes successfully by default. TEST_P(BackendIntegrationTest, BasicInitSucceeds) { - Result loader = FileDataLoader::From(program_path()); + Result loader = FileDataLoader::from(program_path()); ASSERT_EQ(loader.error(), Error::Ok); Result program = Program::Load(&loader.get()); @@ -321,7 +321,7 @@ TEST_P(BackendIntegrationTest, FreeingProcessedBufferSucceeds) { // Wrap the real loader in a spy so we can see which operations were // performed. - Result loader = FileDataLoader::From(program_path()); + Result loader = FileDataLoader::from(program_path()); ASSERT_EQ(loader.error(), Error::Ok); DataLoaderSpy spy_loader(&loader.get()); @@ -385,7 +385,7 @@ TEST_P(BackendIntegrationTest, EndToEndTestWithProcessedAsHandle) { // Wrap the real loader in a spy so we can see which operations were // performed. - Result loader = FileDataLoader::From(program_path()); + Result loader = FileDataLoader::from(program_path()); ASSERT_EQ(loader.error(), Error::Ok); DataLoaderSpy spy_loader(&loader.get()); @@ -530,7 +530,7 @@ TEST_P(DelegateDataAlignmentTest, ExpectedDataAlignment) { // Create a loader that can satisfy the alignment required by this program. Result loader = - FileDataLoader::From(program_path(), /*alignment=*/expected_alignment()); + FileDataLoader::from(program_path(), /*alignment=*/expected_alignment()); ASSERT_EQ(loader.error(), Error::Ok); // Wrap the real loader in a spy so we can see which operations were diff --git a/runtime/executor/test/execution_plan_test.cpp b/runtime/executor/test/execution_plan_test.cpp index bbcb29f8ad3..ecef4498f7c 100644 --- a/runtime/executor/test/execution_plan_test.cpp +++ b/runtime/executor/test/execution_plan_test.cpp @@ -37,7 +37,7 @@ class ExecutionPlanTest : public ::testing::Test { void SetUp() override { // Create a loader for the serialized ModuleAdd program. const char* path = std::getenv("ET_MODULE_ADD_PATH"); - Result loader = FileDataLoader::From(path); + Result loader = FileDataLoader::from(path); ASSERT_EQ(loader.error(), Error::Ok); loader_ = std::make_unique(std::move(loader.get())); diff --git a/runtime/executor/test/kernel_integration_test.cpp b/runtime/executor/test/kernel_integration_test.cpp index 7e6351dd994..5742df2f954 100644 --- a/runtime/executor/test/kernel_integration_test.cpp +++ b/runtime/executor/test/kernel_integration_test.cpp @@ -138,7 +138,7 @@ class KernelIntegrationTest : public ::testing::Test { // Create a loader for the serialized ModuleAdd program. const char* path = std::getenv("ET_MODULE_ADD_PATH"); - Result loader = FileDataLoader::From(path); + Result loader = FileDataLoader::from(path); ASSERT_EQ(loader.error(), Error::Ok); loader_ = std::make_unique(std::move(loader.get())); diff --git a/runtime/executor/test/kernel_resolution_test.cpp b/runtime/executor/test/kernel_resolution_test.cpp index cb82fcd60da..b7e004c06ab 100644 --- a/runtime/executor/test/kernel_resolution_test.cpp +++ b/runtime/executor/test/kernel_resolution_test.cpp @@ -52,7 +52,7 @@ class KernelResolutionTest : public ::testing::Test { // Create a loader for the serialized ModuleAdd program. const char* path = std::getenv("ET_MODULE_ADD_PATH"); - Result loader = FileDataLoader::From(path); + Result loader = FileDataLoader::from(path); ASSERT_EQ(loader.error(), Error::Ok); loader_ = std::make_unique(std::move(loader.get())); diff --git a/runtime/executor/test/method_meta_test.cpp b/runtime/executor/test/method_meta_test.cpp index ffca2616125..f7c8b0e94ea 100644 --- a/runtime/executor/test/method_meta_test.cpp +++ b/runtime/executor/test/method_meta_test.cpp @@ -29,7 +29,7 @@ class MethodMetaTest : public ::testing::Test { void SetUp() override { // Create a loader for the serialized ModuleAdd program. const char* path = std::getenv("ET_MODULE_ADD_PATH"); - Result loader = FileDataLoader::From(path); + Result loader = FileDataLoader::from(path); ASSERT_EQ(loader.error(), Error::Ok); loader_ = std::make_unique(std::move(loader.get())); diff --git a/runtime/executor/test/method_test.cpp b/runtime/executor/test/method_test.cpp index 8abe43632f4..4173d55a2d8 100644 --- a/runtime/executor/test/method_test.cpp +++ b/runtime/executor/test/method_test.cpp @@ -35,7 +35,7 @@ class MethodTest : public ::testing::Test { protected: void load_program(const char* path, const char* module_name) { // Create a loader for the serialized program. - Result loader = FileDataLoader::From(path); + Result loader = FileDataLoader::from(path); ASSERT_EQ(loader.error(), Error::Ok); loaders_.insert( {module_name, diff --git a/runtime/executor/test/program_test.cpp b/runtime/executor/test/program_test.cpp index e3f9eaaeef1..a8cdf9f466a 100644 --- a/runtime/executor/test/program_test.cpp +++ b/runtime/executor/test/program_test.cpp @@ -44,7 +44,7 @@ class ProgramTest : public ::testing::Test { // Load the serialized ModuleAdd data. const char* path = std::getenv("ET_MODULE_ADD_PATH"); - Result loader = FileDataLoader::From(path); + Result loader = FileDataLoader::from(path); ASSERT_EQ(loader.error(), Error::Ok); // This file should always be compatible. @@ -59,7 +59,7 @@ class ProgramTest : public ::testing::Test { // Load the serialized ModuleAdd data. path = std::getenv("ET_MODULE_MULTI_ENTRY_PATH"); - Result multi_loader = FileDataLoader::From(path); + Result multi_loader = FileDataLoader::from(path); ASSERT_EQ(multi_loader.error(), Error::Ok); // This file should always be compatible. diff --git a/sdk/runners/executor_runner.cpp b/sdk/runners/executor_runner.cpp index 6b4128a625b..f6e7e990576 100644 --- a/sdk/runners/executor_runner.cpp +++ b/sdk/runners/executor_runner.cpp @@ -105,7 +105,7 @@ class ProgramData { // Create a DataLoader that wraps the input file. It may be a plain Program, // or it may be a BundledProgram that contains a Program. Result loader = - util::FileDataLoader::From(filename.c_str()); + util::FileDataLoader::from(filename.c_str()); ET_CHECK_MSG( loader.ok(), "Could not create loader for file '%s': 0x%x", diff --git a/test/size_test.cpp b/test/size_test.cpp index ee4b9108b9a..3d5b3ee695a 100644 --- a/test/size_test.cpp +++ b/test/size_test.cpp @@ -52,9 +52,9 @@ int main(int argc, char** argv) { &runtime_allocator, &temp_allocator)}; - Result loader = FileDataLoader::From(argv[1]); + Result loader = FileDataLoader::from(argv[1]); ET_CHECK_MSG( - loader.ok(), "FileDataLoader::From() failed: 0x%" PRIx32, loader.error()); + loader.ok(), "FileDataLoader::from() failed: 0x%" PRIx32, loader.error()); uint32_t prof_tok = EXECUTORCH_BEGIN_PROF("de-serialize model"); const auto program = Program::Load(&loader.get());