-
Notifications
You must be signed in to change notification settings - Fork 1
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
[tests][modernize]Make the tests compile with hipSYCL #4
base: master
Are you sure you want to change the base?
Conversation
*Changed e.get_cl_code to e.what *Fixed namespace sycl:: to cl::sycl *Gave explict type to exception_handler
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.
looks good in general :)
@@ -224,7 +224,7 @@ template <typename fp> | |||
static void gemm(CBLAS_LAYOUT layout, CBLAS_TRANSPOSE transa, CBLAS_TRANSPOSE transb, const int *m, | |||
const int *n, const int *k, const fp *alpha, const fp *a, const int *lda, | |||
const fp *b, const int *ldb, const fp *beta, fp *c, const int *ldc); | |||
|
|||
#ifdef NOT_HIPSYCL |
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.
could you use the ENABLE_HALF_ROUTINES
here and get rid of the explicit NOT_HIPSYCL
macro?
or instead just use a macro that is defined by hipSYCL anyways?
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.
Ohh.. this shouldn't be here at all... this should be in #6 ... Thanks for noticing :) But I think I'll let this be here, instead of moving it over to the other PR
@@ -44,6 +44,7 @@ | |||
|
|||
#define POISSON_ARGS 0.5 | |||
|
|||
using namespace cl; |
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.
Why do you need to open the cl
namespace if you then qualify everything with cl::
in the code below?
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 don't see any good reason to do it so. I will remove the qualifications from below, to reduce the diff.
@@ -46,15 +46,15 @@ namespace { | |||
template <typename fp> | |||
int test(device *dev, oneapi::mkl::layout layout, int64_t group_count) { | |||
// Catch asynchronous exceptions. | |||
auto exception_handler = [](exception_list exceptions) { | |||
cl::sycl::async_handler exception_handler = [](exception_list exceptions) { |
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.
Why is it even necessary to not use auto
? I think it should also work with auto
.
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.
Mhmm, it doesn't seem to be necessary anymore... I recall that a few weeks ago there was an issue with hipSYCL regarding this.
This PR concenrs the tests. The following two changes were made:
cl::sycl::async_handler
instead ofauto
type.what()
instead of usingget_cl_code()