-
Notifications
You must be signed in to change notification settings - Fork 488
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build CPP tests in new CI workflow #6947
Conversation
acf0586
to
d3c9c38
Compare
// Placeholder plugin for testing only. Does not implement multiprocessing or | ||
// configuration. Very likely will not work from Python code. | ||
class LibraryPlugin : public PjRtPlugin { | ||
public: | ||
std::string library_path() const override { | ||
return sys_util::GetEnvString("PJRT_LIBRARY_PATH", ""); | ||
} | ||
|
||
const std::unordered_map<std::string, xla::PjRtValueType> | ||
client_create_options() const override { | ||
return {}; | ||
} | ||
|
||
bool requires_xla_coordinator() const override { return false; } | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need this plugin?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just a minimal implementation of the plugin interface that lets us pass in a path. We want to take this codepath during init, rather than the statically linked CUDA client:
if (sys_util::GetEnvBool(env::kEnvPjrtDynamicPlugins, false) && |
Normally the plugin registration is done through Python, so we need a workaround for the C++ tests.
torch_xla
package and the C++ tests, this invalidates the cache. Rather than trying to bringtest/cpp/run_test.sh
in line withsetup.py
, we can just build everything at oncetest_suite
for CPP testsA typical run in the old CI took about 2.5 hours. This test run took only 1 hour and 10 minutes. Most tests in the new workflow finish before the old build finishes, e.g.