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
Add new test for get_pointer_type and get_pointer_device USM API #131
Conversation
Provide verification to cooperation USM functions get_pointer_type and get_pointer_device with four memory allocation types: host, device, shared and non USM allocation.
de5a0fb
to
bf245b8
Compare
Co-authored-by: Peter Žužek <peterzuzek@gmail.com>
sycl::malloc_host<elems_typeT>(num_elements, context), deleter); | ||
return usm_memory; | ||
} else { | ||
static_assert(alloc != alloc, "Unknown USM allocation type"); |
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.
Is this to have a dependent static_assert
to avoid triggering with false
independently from the if constexpr
?
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.
If i correctly understood you.
We using static_assert
here to interrupt compilation if test developer try to allocate memory from non USM allocation type (here we using all available allocation types from SYCL2020 spec section #4.8.2. "Kinds of unified shared memory")
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.
My question was about
static_assert(false, "Unknown USM allocation type");
that you cannot probably use?
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.
Yes, that good decision, thanks for your advice
This change was made in: 684a2ec
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.
@keryell @vasilytric I assume 684a2ec will break compilation due non-conditional static_assert. See SO thread for details
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.
@keryell Yes, static_assert(false, "Unknown USM allocation type");
cannot be used
This reverts commit 684a2ec. This commit added compilation brake changes.
…0920 Auto pulldown for intel/SYCL-2020 branch on 20210920 JIRA: CMPLRLLVM-31299
Provide verification to cooperation USM functions get_pointer_type
and get_pointer_device with four memory allocation types:
host, device, shared and non USM allocation.