-
Notifications
You must be signed in to change notification settings - Fork 769
[SYCL] [NFC] Make instance variable in scheduler singleton #2286
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
[SYCL] [NFC] Make instance variable in scheduler singleton #2286
Conversation
Signed-off-by: Sergey Kanaev <sergey.kanaev@intel.com>
@@ -122,14 +122,35 @@ EventImplPtr Scheduler::addCopyBack(Requirement *Req) { | |||
// The init_priority here causes the constructor for scheduler to run relatively | |||
// early, and therefore the destructor to run relatively late (after anything | |||
// else that has no priority set, or has a priority higher than 2000). | |||
Scheduler Scheduler::instance __attribute__((init_priority(2000))); | |||
std::atomic<Scheduler *> Scheduler::instance(nullptr); |
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.
a more c++ way?
std::atomic<Scheduler *> Scheduler::instance(nullptr); | |
std::atomic<Scheduler *> Scheduler::instance{nullptr}; |
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.
An even more C++ way?
std::atomic<Scheduler *> Scheduler::instance {};
@s-kanaev isn't it going to produce a memory leak? I don't see any code for Scheduler destruction. |
Why not make it to be just a unique_ptr?: |
@s-kanaev, do you plan to merge this? |
I think not. |
Align installation rules for XPTI libraries with the ones used for OpenCL ICD loader to avoid installing to lib64 directory. That causes missing of the libraries during E2E testing: - llvm_test_suite_sycl/xpti_buffer* tests are impacted.
Align installation rules for XPTI libraries with the ones used for OpenCL ICD loader to avoid installing to lib64 directory. That causes missing of the libraries during E2E testing: - llvm_test_suite_sycl/xpti_buffer* tests are impacted.
This PR preserves unsigned return type of image read and unsigned texel type of image write builtins as ZeroExtend image operand in SPIRV. Original commit: KhronosGroup/SPIRV-LLVM-Translator@0aab124
[Common] fix parseDisjointPoolConfig
This may be needed for testing purposes in unit-tests.