-
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
[half]Add ifdefs around usages of half #6
base: master
Are you sure you want to change the base?
Conversation
146b9e2
to
f9a3289
Compare
Use DISABLE_HALF_RUTINES, use cmake config to set
src/config.hpp.in
Outdated
@@ -25,6 +25,7 @@ | |||
#cmakedefine ENABLE_MKLCPU_BACKEND | |||
#cmakedefine ENABLE_MKLGPU_BACKEND | |||
#cmakedefine ENABLE_NETLIB_BACKEND | |||
#cmakedefine DISABLE_HALF_RUTINES |
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.
typo: routines
and also I'm not really a fan of disabling stuff... can we make this a ENABLE..
and default to ON
or isn't it possible to default something in this weird file? :)
include/oneapi/mkl/blas.hxx
Outdated
@@ -261,7 +261,7 @@ static inline void gemm(cl::sycl::queue &queue, transpose transa, transpose tran | |||
c, ldc); | |||
gemm_postcondition(queue, transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc); | |||
} | |||
|
|||
#ifdef ENABLE_HALF_ROUTINES |
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.
Do we even need to ifdef away this interface entirely? Could we just keep the interface and throw an exception if we detect that we want to run a half function on a device that does not support half (which currently is always in hipSYCL)? I think hipSYCL defines the half
type to something like a short
, so the interface by itself should compile.
in hipSYCL half is not implemented yet therefore we need to disable the functions that use it