From c29de6e72792f35069c8e3cf920fc3203ceb92f1 Mon Sep 17 00:00:00 2001 From: Sebastian Berg Date: Thu, 12 Dec 2024 15:44:10 +0000 Subject: [PATCH] Use plain `legate::start()` (args are deprecated) Legate has auto-configure now and LEGATE_CONFIG or the legate launcher can still be used. (There may be a way to re-instate it, but it doesn't seem worthwhile to me right now) Signed-off-by: Sebastian Berg --- README.md | 4 ++-- cpp/examples/hello.cpp | 6 +++--- cpp/tests/main.cpp | 13 +------------ 3 files changed, 6 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 53b4622..79077e0 100644 --- a/README.md +++ b/README.md @@ -121,8 +121,8 @@ if __name__ == "__main__": int main(int argc, char** argv) { - // First we initialize Legate and cuPyNumeric - int32_t errcode = legate::start(argc, argv); + // First we initialize Legate use either `legate` or `LEGATE_CONFIG` to customize launch + int32_t errcode = legate::start(); if (errcode != 0) { throw std::runtime_error("legate::start() errorcode: " + std::to_string(errcode)); } diff --git a/cpp/examples/hello.cpp b/cpp/examples/hello.cpp index 200787f..a08b2b0 100644 --- a/cpp/examples/hello.cpp +++ b/cpp/examples/hello.cpp @@ -24,10 +24,10 @@ #include #include -int main(int argc, char** argv) +int main(void) { - // First we initialize Legate - int32_t errcode = legate::start(argc, argv); + // First we initialize Legate use either `legate` or `LEGATE_CONFIG` to customize launch + int32_t errcode = legate::start(); if (errcode != 0) { throw std::runtime_error("legate::start() errorcode: " + std::to_string(errcode)); } diff --git a/cpp/tests/main.cpp b/cpp/tests/main.cpp index 13d1b3c..01a4731 100644 --- a/cpp/tests/main.cpp +++ b/cpp/tests/main.cpp @@ -19,19 +19,8 @@ class Environment : public ::testing::Environment { public: - Environment(int argc, char** argv) : argc_(argc), argv_(argv) {} - - void SetUp() override - { - const char* argv[] = {"./test", "--gpus", "2"}; // TODO: make configurable - int argc = 3; - EXPECT_EQ(legate::start(argc, (char**)argv), 0); - } + void SetUp() override { EXPECT_EQ(legate::start(), 0); } void TearDown() override { EXPECT_EQ(legate::finish(), 0); } - - private: - int argc_; - char** argv_; }; int main(int argc, char** argv)