-
Notifications
You must be signed in to change notification settings - Fork 115
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
[DeviceSanitizer] Checking "sycl::free" related errors #1402
Conversation
Silence warnings about using outdated version of Node.js due to using actions/[email protected].
If an OpenCL driver returns `CL_PROGRAM_BINARY_TYPE_INTERMEDIATE` (defined in the `cl_khr_spir` extension to enable SPIR 1.2 not SPIR-V) when querying `CL_PROGRAM_BINARY_TYPE` we should handle this gracefully. This patch maps the `CL_PROGRAM_BINARY_TYPE_INTERMEDIATE` to `UR_PROGRAM_BINARY_TYPE_NONE`. From the users perspective these are semantically equivalent as they both require compilation before the program can be used to create a kernel.
Replace uses of `sizeof(const char*)` with `std::strlen(const char*)` in CUDA adapter specific kernel tests.
These changes to the *Adapter Change Process* aim to bring the process up to date with current practice by describing how the *ready to merge* label is being used and also to move the undrafting of *intel/llvm* pull requests earlier in the process to garner approvals from code-reviewers sooner to alleviate a bottleneck in the merge pipeline.
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #1402 +/- ##
==========================================
- Coverage 14.82% 12.44% -2.38%
==========================================
Files 250 251 +1
Lines 36220 36265 +45
Branches 4094 4117 +23
==========================================
- Hits 5369 4514 -855
- Misses 30800 31747 +947
+ Partials 51 4 -47 ☔ View full report in Codecov by Sentry. |
109941a
to
def6bd0
Compare
Hi @pbalcer. |
@oneapi-src/unified-runtime-level-zero-write @oneapi-src/unified-runtime-command-buffer-write please review |
Thanks! |
This code looks unrelated to command-buffers, could somebody explain why |
I guess this is because the first few commits. |
No, we can just squash this during merge. I believe all necessary reviews already happened, so this should be ready to merge. |
@AllanZyne there's still a pending approval on intel/llvm#12882 from the |
@AllanZyne I see the approval came in, we'll merge this next once intel/llvm#12447 goes in. |
@kbenzie did you get all necessary approval for merging this PR? We need to merge it asap for Aurora project deliverable. Thanks. |
Everything is there. As I mentioned above:
That's not merge yet but we're working on it. |
THANKS! |
Thanks for your help, @xtian-github! |
UR: oneapi-src/unified-runtime#1402 This PR added supports for checking the following types of error in "UR_LAYER_ASAN": - bad-free: the memory address to be freed is not allocated by UR - bad-context: the memory address to be freed uses a wrong "context" - double-free: the memory address to be freed is already freed - use-after-free: the freed memory is used in kernel I added the environment variable "UR_LAYER_ASAN_OPTIONS" to have additional control over "UR_LAYER_ASAN", which is similar to "ASAN_OPTIONS" in [ASan](https://github.com/google/sanitizers/wiki/AddressSanitizerFlags). Currently, it supports: - "quarantine_size_mb" (default = 0) - Size (in MB) of quarantine per device. The pointers passed to urUSMFree are not freed immediately, but saved into QuarantineCache (per device cache), and when the cached chunk size (only counts the size of USM buffer, not shadow memory) is more than "quarantine_size_mb", the first enqueued chunk will be freed (aka., FIFO). Lower value may reduce memory usage but increase the chance of false negatives - This option must be enabled for checking "double-free" and "use-after-free" - "debug" (default = 0) - Print extra debug messages in kernel ("__AsanDebug” in “libdevice/sanitizer_utils.cpp”), which is helpful for DeviceSanitizer developers. For example, to enable "use-after-free" with 5MB quarantine cache and debug message in kernel, you need to ```bash UR_LAYER_ASAN_OPTIONS="quarantine_size_mb:5;debug:1" ./sycl_app ``` --------- Co-authored-by: Maosu Zhao <[email protected]> Co-authored-by: Aaron Greig <[email protected]>
LLVM: intel/llvm#12882
See details in LLVM PR.