Merged
Conversation
Example of usage:
```
(dev_dpctl) opavlyk@opavlyk-mobl:~/repos/dpctl$ ~/pti-gpu/tools/onetrace/build/onetrace --conditional-collection -v -t --demangle ipython
Device Timeline: start time (CLOCK_MONOTONIC_RAW) [ns] = 207284739877222
Device Timeline: start time (CLOCK_MONOTONIC) [ns] = 207284790110055
Device Timeline: start time (CLOCK_REALTIME) [ns] = 1662686020459161393
Python 3.9.12 (main, Jun 1 2022, 11:38:51)
Type 'copyright', 'credits' or 'license' for more information
IPython 8.4.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import dpctl.tensor as dpt, dpctl, numpy as np
Device Timeline: start time (CLOCK_MONOTONIC_RAW) [ns] = 207294358012969
Device Timeline: start time (CLOCK_MONOTONIC) [ns] = 207294408245381
Device Timeline: start time (CLOCK_REALTIME) [ns] = 1662686030077296715
Device Timeline: start time (CLOCK_MONOTONIC_RAW) [ns] = 207294447416361
Device Timeline: start time (CLOCK_MONOTONIC) [ns] = 207294497648642
Device Timeline: start time (CLOCK_REALTIME) [ns] = 1662686030166699977
Device Timeline: start time (CLOCK_MONOTONIC_RAW) [ns] = 207294522074685
Device Timeline: start time (CLOCK_MONOTONIC) [ns] = 207294572308151
Device Timeline: start time (CLOCK_REALTIME) [ns] = 1662686030241359487
Device Timeline: start time (CLOCK_MONOTONIC_RAW) [ns] = 207294602756763
Device Timeline: start time (CLOCK_MONOTONIC) [ns] = 207294652988740
Device Timeline: start time (CLOCK_REALTIME) [ns] = 1662686030322040075
In [2]: from dpctl.utils import onetrace_enabled
In [3]: with onetrace_enabled():
...: dpt.linspace(0, 1, num=1000, dtype='f4')
...: dpt.arange(0, 20, dtype='i4')
...:
Device Timeline (queue: 0x56315e00e720): linear_sequence_affine_kernel<float, float>[SIMD32 {5; 1; 1} {200; 1; 1}]<1.1> [ns] = 49099144803 (append) 49099446053 (submit) 49101192928 (start) 49101202303 (end)
Device Timeline (queue: 0x56315e00e720): linear_sequence_step_kernel<int>[SIMD32 {1; 1; 1} {20; 1; 1}]<2.1> [ns] = 49154332484 (append) 49154668024 (submit) 49155196149 (start) 49155213440 (end)
In [4]: quit
Segmentation fault
```
The segmenation fault at the exit is a known issue with ZE-tracer module.
|
View rendered docs @ https://intelpython.github.io/dpctl/pulls/903/index.html |
Collaborator
b5fc478 to
5993fb1
Compare
5993fb1 to
22f2df5
Compare
|
Array API standard conformance tests failed to run. |
onetrace tool on linux uses execvp to start the application to trace. It sets LD_PRELOAD and PTI_ENABLE environment variables https://github.com/intel/pti-gpu/blob/master/loader/loader.cc#L216-L217 The check is added, on Linux, to confirm once that environment does contain expected variables, and emit a warning otherwise.
|
Array API standard conformance tests failed to run for dpctl=0.14.0dev0=py310h8c27c75_83. |
Contributor
Author
|
@diptorupd This PR is now ready. I have added checks on Linux that the interpreter has been launched by onetrace. |
|
Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. 🤞 |
|
Array API standard conformance tests failed to run for dpctl=0.14.0dev0=py310h8c27c75_90. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds implementation of
onetrace_enabledcontext manager todpctl.utilsnamespace.Example of usage:
The segmenation fault at the exit is a known issue with ZE-tracer module.