-
Notifications
You must be signed in to change notification settings - Fork 808
[SYCL][XPTI] Revisit resource management strategy #4494
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
Changes from 5 commits
51f5258
73115fa
a706b8a
86111c7
ae1184d
10546f1
028beae
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,6 +31,15 @@ inline constexpr const char *SYCL_PIDEBUGCALL_STREAM_NAME = "sycl.pi.debug"; | |
|
|
||
| class XPTIRegistry { | ||
| public: | ||
| void initializeFrameworkOnce() { | ||
andykaylor marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| #ifdef XPTI_ENABLE_INSTRUMENTATION | ||
| if (!MInitialized) { | ||
|
||
| xptiFrameworkInitialize(); | ||
| MInitialized = true; | ||
| } | ||
| #endif | ||
| } | ||
|
|
||
| /// Notifies XPTI subscribers about new stream. | ||
| /// | ||
| /// \param StreamName is a name of newly initialized stream. | ||
|
|
@@ -50,11 +59,13 @@ class XPTIRegistry { | |
| for (const auto &StreamName : MActiveStreams) { | ||
| xptiFinalize(StreamName.c_str()); | ||
| } | ||
| xptiFrameworkFinalize(); | ||
andykaylor marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| #endif // XPTI_ENABLE_INSTRUMENTATION | ||
| } | ||
|
|
||
| private: | ||
| std::unordered_set<std::string> MActiveStreams; | ||
| bool MInitialized = false; | ||
| }; | ||
| } // namespace detail | ||
| } // namespace sycl | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.