Skip to content

Disable memory poisoning in DisjointPool by default #633

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

Merged
merged 1 commit into from
Jul 25, 2024

Conversation

PatKamin
Copy link
Contributor

@PatKamin PatKamin commented Jul 24, 2024

ASan throws an error whenever the memory poison is called for the memory allocated on GPU:
"AddressSanitizer: CHECK failed: asan_mapping.h:359 "((AddrIsInMem(p))) != (0)" (0x0, 0x0)".

This commit disables poisoning by default and adds a new parameter to Disjoint Pool params struct that allows to enable the poisoning.

Description

Checklist

  • Code compiles without errors locally
  • All tests pass locally
  • CI workflows execute properly
  • CI workflows, not executed per PR (e.g. Nightly), execute properly
  • New tests added, especially if they will fail without my changes
  • Added/extended example(s) to cover this functionality
  • Extended the README/documentation
  • All newly added source files have a license
  • All newly added source files are referenced in CMake files
  • Logger (with debug/info/... messages) is used

@PatKamin PatKamin requested a review from a team as a code owner July 24, 2024 10:33
@PatKamin PatKamin requested review from kswiecicki and igchor July 24, 2024 10:33
@@ -58,6 +58,9 @@ typedef struct umf_disjoint_pool_params_t {

/// Name used in traces
const char *Name;

/// Whether the pool is limited to host memory
int HostMemory;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be some generics bit flags that we can add to.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've disabled poisoning always in DisjointPool for now and created an issue for discussion on the way the optional memory poisoning should be implemented: #634

@PatKamin PatKamin force-pushed the disable-poisoning branch from 59b1fa2 to de92b8a Compare July 24, 2024 12:15
@lplewa
Copy link
Contributor

lplewa commented Jul 24, 2024

Please create macro or function to conditionally poison block - so we have only one ifdef in the code.

ASan throws an error whenever the memory poison is called for the memory allocated on GPU:
"AddressSanitizer: CHECK failed: asan_mapping.h:359 "((AddrIsInMem(p))) != (0)" (0x0, 0x0)".

This commit disables poisoning.
@PatKamin PatKamin force-pushed the disable-poisoning branch from de92b8a to 3fe23a3 Compare July 24, 2024 14:07
@PatKamin
Copy link
Contributor Author

Please create macro or function to conditionally poison block - so we have only one ifdef in the code.

I've created two functions for wrapping ifdefs, please verify.

@bratpiorka bratpiorka merged commit e15b749 into oneapi-src:main Jul 25, 2024
63 checks passed
@PatKamin PatKamin deleted the disable-poisoning branch December 31, 2024 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants