Skip to content

Commit 3cb60dd

Browse files
Fix empty kernel name issue for old and new compilers. (#150)
1 parent 56584ee commit 3cb60dd

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

src/blas/backends/cublas/cublas_scope_handle.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ namespace cublas {
3131
* takes place if no other element in the container has a key equivalent to
3232
* the one being emplaced (keys in a map container are unique).
3333
*/
34-
thread_local cublas_handle<pi_context> CublasScopedContextHandler::handle_helper = cublas_handle<pi_context>{};
34+
thread_local cublas_handle<pi_context> CublasScopedContextHandler::handle_helper =
35+
cublas_handle<pi_context>{};
3536

3637
CublasScopedContextHandler::CublasScopedContextHandler(cl::sycl::queue queue,
3738
cl::sycl::interop_handler &ih)

src/blas/backends/mklgpu/mklgpu_batch.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,20 @@ namespace blas {
3030
namespace mklgpu {
3131
namespace column_major {
3232

33-
#define MAJOR MKL_COL_MAJOR
33+
#define MAJOR MKL_COL_MAJOR
34+
#define EMPTY_KERNEL_NAME ColMajorEmptyKernel
3435
#include "mklgpu_batch.cxx"
3536
#undef MAJOR
37+
#undef EMPTY_KERNEL_NAME
3638

3739
} // namespace column_major
3840
namespace row_major {
3941

40-
#define MAJOR MKL_ROW_MAJOR
42+
#define MAJOR MKL_ROW_MAJOR
43+
#define EMPTY_KERNEL_NAME RowMajorEmptyKernel
4144
#include "mklgpu_batch.cxx"
4245
#undef MAJOR
46+
#undef EMPTY_KERNEL_NAME
4347

4448
} // namespace row_major
4549
} // namespace mklgpu

src/blas/backends/mklgpu/mklgpu_batch.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ cl::sycl::event *coalesce_events(cl::sycl::queue &queue, std::vector<cl::sycl::e
296296
return new cl::sycl::event(queue.submit([&](cl::sycl::handler &cgh) {
297297
for (int64_t i = 0; i < prereqs.size(); i++)
298298
cgh.depends_on(*prereqs[i]);
299-
cgh.single_task<class MAJOR>([]() {});
299+
cgh.single_task<class EMPTY_KERNEL_NAME>([]() {});
300300
}));
301301
}
302302
else

0 commit comments

Comments
 (0)