-
Notifications
You must be signed in to change notification settings - Fork 769
[SYCL] Instrumentation for application profiling #1129
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
Conversation
855fa3e
to
e622a4d
Compare
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 general comment. Am I right that users need to add some kind of definition to their command lines? Can you please document them in user guide? Should we also create a more user friendly alias for clang driver?
There should not be any definition in the command-lines as it stands right now, but -fsycl should automatically add -DSYCL_INSTRUMENTATION_METADATA to provide the opportunity to disable the default argument in the future |
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.
Amazing work and useful feature!
A few remarks...
This is the first part of my review. Probably more tomorrow...
95cd2bc
to
9fef108
Compare
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.
Thanks for the changes.
A few remarks for today.
I made another code review with 84 items but when I submit the review GitHub fails with:
|
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.
Thanks for the changes.
Here are my comments for today.
Ah, GitHub is back and running... |
Please avoid force-pushing, it is difficult to trace the evolution... |
Thank you for the exhaustive review. All cosmetic changes have been applied along with the {} initializer. API changes to reduce type casting will be batched together for separate commit. |
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.
First review.
sycl/include/CL/sycl/handler.hpp
Outdated
// Save streams associated with this handler. Streams are then forwarded to | ||
// command group and flushed in the scheduler. | ||
void addStream(std::shared_ptr<detail::stream_impl> s) { | ||
MStreamStorage.push_back(std::move(s)); |
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.
Hm, @keryell Could you please point to some docs that say that "s" will be rvalue here?
That should have been "request changes"
"Resolved" some conversation which seems to be resolved. @keryell please, reopen if I closed something by mistake. |
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.
Interesting feature!
After having a better view of the project, I think that you tried to adapt the Windows API using some std::wstring
to the POSIX world but it seems simpler and more efficient to do the opposite and keep the Windows idiosyncrasies under very local control instead. For some discussion: https://stackoverflow.com/questions/402283/stdwstring-vs-stdstring
@keryell The std::wstring is primarily used to store wide string paths in the case of Windows with localization. To keep the interface simpe for this, std::wstring was applied to both WIndows and Linux/macOS |
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.
Great improvement!
The best code we can write is the one we do not write, because there is no bug in it. :-)
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.
Almost done!
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.
LGTM
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.
That looks good.
@tovinkere Please, fix build issue reported by CI. |
target_compile_options(xpti PRIVATE ${XPTI_CXX_FLAGS_RELEASE}) | ||
endif() | ||
add_library(xptid STATIC ${SOURCES}) | ||
target_compile_options(xptid PRIVATE ${XPTI_CXX_FLAGS_DEBUG}) |
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.
I believe the correct way to form options for xptid is to do the same things which are done in sycl/source/CMakeLists.txt:132-175. Please, fix in a separate PR.
@tovinkere There are some commits which are not sign-off'ed. This blocks merge, please resolve. |
+ XPTI proxy library to provide entry points into the xpti instrumentation framework + Header specification of the XPTI framework API calls + Documentation describing the changes to SYCL runtime available under xpti/doc + SYCL runtime instrumentation using XPTI proxy library to monitor the creation of the asynchronous task graph (nodes and dependencies) + Instrumentation of entry points in queue to capture the end-user source code locations of calls to submit, parallel_for etc. + Updates to the CMakeLists.txt to soft enable the XPTI instrumentation and linking of the SYCL library with the XPTI proxy/stub library + Updates to the CI scripts to include XPTI proxy library in building along with enabling of the instrumentation in the SYCL library Signed-off-by: Vasanth Tovinkere <vasanth.tovinkere@intel.com>
fdd15ab
to
8d7eed9
Compare
…e_api_test * origin/sycl: [SYCL][NFC] Fix static code analysis concerns (intel#1283) [SYCL] Fix the test/basic_tests/buffer/subbuffer.cpp (intel#1277) [SYCL][CUDA] Implement the program kernel names query (intel#1248) [SYCL] Honor the LLVM_LIBDIR_SUFFIX variable at installation time (intel#1261) [SYCL][UX] Diagnostic for undefined device functions (intel#1026) [SYCL] Reverse reqd_work_group_size attribute (intel#1234) [SYCL] Rename project to oneAPI DPC++ Compiler (intel#1249) [SYCL][XPTI] Instrumentation of SYCL runtime with XPTI (intel#1129)
…st_commit * otcshare/sycl: (469 commits) [SYCL] Implement thread-local storage restriction (intel#1281) [Driver][SYCL][FPGA] Adjust the output location for the project report (intel#1278) [SYCL][NFC] Fix static code analysis concerns (intel#1283) [SYCL] Fix the test/basic_tests/buffer/subbuffer.cpp (intel#1277) [SYCL][CUDA] Implement the program kernel names query (intel#1248) [SYCL] Honor the LLVM_LIBDIR_SUFFIX variable at installation time (intel#1261) [SYCL][UX] Diagnostic for undefined device functions (intel#1026) [SYCL] Reverse reqd_work_group_size attribute (intel#1234) [SYCL] Rename project to oneAPI DPC++ Compiler (intel#1249) [SYCL][XPTI] Instrumentation of SYCL runtime with XPTI (intel#1129) [SYCL] Add buffer dimensions restriction (intel#1147) [SYCL][NFC] Update copyright header in handler files (intel#1271) [SYCL][NFC] Format the code with clang-format [SYCL][Test] Fix SYCL library location path for LIT tests (intel#1228) [SYCL][NFC] Fix doxygen warnings (intel#1270) [SYCL][CUDA] Add the CUDA backend to the deploy-sycl-toolchain target (intel#1268) [SYCL][NFC] Fix a misleading comment regarding the SYCL flow (intel#1266) Change capability for SpecId decoration README.md: Mention retrieving llvm archive signatures travis: Restore macOS builds ...
…_accessor_refactor * origin/sycl: (454 commits) [SYCL][NFC] Fix static code analysis concerns (intel#1283) [SYCL] Fix the test/basic_tests/buffer/subbuffer.cpp (intel#1277) [SYCL][CUDA] Implement the program kernel names query (intel#1248) [SYCL] Honor the LLVM_LIBDIR_SUFFIX variable at installation time (intel#1261) [SYCL][UX] Diagnostic for undefined device functions (intel#1026) [SYCL] Reverse reqd_work_group_size attribute (intel#1234) [SYCL] Rename project to oneAPI DPC++ Compiler (intel#1249) [SYCL][XPTI] Instrumentation of SYCL runtime with XPTI (intel#1129) [SYCL] Add buffer dimensions restriction (intel#1147) [SYCL][NFC] Update copyright header in handler files (intel#1271) [SYCL][NFC] Format the code with clang-format [SYCL][Test] Fix SYCL library location path for LIT tests (intel#1228) [SYCL][NFC] Fix doxygen warnings (intel#1270) [SYCL][CUDA] Add the CUDA backend to the deploy-sycl-toolchain target (intel#1268) Change capability for SpecId decoration README.md: Mention retrieving llvm archive signatures travis: Restore macOS builds Fix DebugInfo creation after LLVM change 7a42bab Add more missing mixes Add missing fixes ...
…ntal status. (intel#1129) Tests changes for intel#6524 Signed-off-by: Rajiv Deodhar <rajiv.deodhar@intel.com> Co-authored-by: JackAKirk <jack.kirk@codeplay.com>
Overview
llvm/xpti
. If the dynamic portion of the instrumentation framework is not available, then tracing gets disabled. Tracing can also be disabled by using environment variables as well.llvm/xpti/doc
.