Skip to content
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

Use appropiately qualified names in blas and rng #105

Merged
merged 5 commits into from
Aug 19, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion include/oneapi/mkl/blas/detail/cublas/blas_ct.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,6 @@ void gemm(backend_selector<backend::cublas> selector, transpose transa, transpos
gemm_postcondition(selector.get_queue(), transa, transb, m, n, k, alpha, a, lda, b, ldb, beta,
c, ldc);
}

mmeterel marked this conversation as resolved.
Show resolved Hide resolved
void syr2(backend_selector<backend::cublas> selector, uplo upper_lower, std::int64_t n, float alpha,
cl::sycl::buffer<float, 1> &x, std::int64_t incx, cl::sycl::buffer<float, 1> &y,
std::int64_t incy, cl::sycl::buffer<float, 1> &a, std::int64_t lda) {
Expand Down
2 changes: 0 additions & 2 deletions include/oneapi/mkl/blas/predicates.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -1557,7 +1557,6 @@ inline void gemm_postcondition(cl::sycl::queue &queue, transpose transa, transpo
/* add postchecks to queue here for input args. */
#endif
}

inline void syr2_precondition(cl::sycl::queue &queue, uplo upper_lower, std::int64_t n, float alpha,
cl::sycl::buffer<float, 1> &x, std::int64_t incx,
cl::sycl::buffer<float, 1> &y, std::int64_t incy,
Expand Down Expand Up @@ -4749,7 +4748,6 @@ inline void gemm_postcondition(cl::sycl::queue &queue, transpose transa, transpo
/* add postchecks to queue here for input args. */
#endif
}

inline void gemm_precondition(cl::sycl::queue &queue, transpose transa, transpose transb,
std::int64_t m, std::int64_t n, std::int64_t k, half alpha,
const half *a, std::int64_t lda, const half *b, std::int64_t ldb,
Expand Down
2 changes: 2 additions & 0 deletions include/oneapi/mkl/detail/backend_selector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
namespace oneapi {
namespace mkl {

using namespace cl;
mkrainiuk marked this conversation as resolved.
Show resolved Hide resolved

template <backend Backend>
class backend_selector {
public:
Expand Down
1 change: 0 additions & 1 deletion src/blas/blas_loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3495,7 +3495,6 @@ void gemm(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose transa,
function_tables[libkey].row_major_zgemm_sycl(queue, transa, transb, m, n, k, alpha, a, lda, b,
ldb, beta, c, ldc);
}

mmeterel marked this conversation as resolved.
Show resolved Hide resolved
void gemm(oneapi::mkl::device libkey, cl::sycl::queue &queue, transpose transa, transpose transb,
std::int64_t m, std::int64_t n, std::int64_t k, half alpha, cl::sycl::buffer<half, 1> &a,
std::int64_t lda, cl::sycl::buffer<half, 1> &b, std::int64_t ldb, half beta,
Expand Down
2 changes: 2 additions & 0 deletions src/rng/backends/mklcpu/mrg32k3a.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ namespace mkl {
namespace rng {
namespace mklcpu {

using namespace cl;
mmeterel marked this conversation as resolved.
Show resolved Hide resolved

class mrg32k3a_impl : public oneapi::mkl::rng::detail::engine_impl {
public:
mrg32k3a_impl(cl::sycl::queue queue, std::uint32_t seed)
Expand Down
2 changes: 2 additions & 0 deletions src/rng/backends/mklcpu/philox4x32x10.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ namespace mkl {
namespace rng {
namespace mklcpu {

using namespace cl;

class philox4x32x10_impl : public oneapi::mkl::rng::detail::engine_impl {
public:
philox4x32x10_impl(cl::sycl::queue queue, std::uint64_t seed)
Expand Down
1 change: 0 additions & 1 deletion tests/unit_tests/blas/include/reference_blas_templates.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,6 @@ template <typename fpa, typename fpc>
static void gemm(CBLAS_LAYOUT layout, CBLAS_TRANSPOSE transa, CBLAS_TRANSPOSE transb, const int *m,
const int *n, const int *k, const fpc *alpha, const fpa *a, const int *lda,
const fpa *b, const int *ldb, const fpc *beta, fpc *c, const int *ldc);

mmeterel marked this conversation as resolved.
Show resolved Hide resolved
template <>
void gemm(CBLAS_LAYOUT layout, CBLAS_TRANSPOSE transa, CBLAS_TRANSPOSE transb, const int *m,
const int *n, const int *k, const float *alpha, const half *a, const int *lda,
Expand Down
4 changes: 2 additions & 2 deletions tests/unit_tests/blas/include/test_common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
#include <CL/sycl.hpp>

namespace std {
static cl::sycl::half abs(cl::sycl::half v) {
if (v < cl::sycl::half(0))
static half abs(half v) {
if (v < half(0))
mmeterel marked this conversation as resolved.
Show resolved Hide resolved
return -v;
else
return v;
Expand Down
4 changes: 2 additions & 2 deletions tests/unit_tests/rng/include/rng_test_common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ class rng_test {
// method to call any tests, switch between rt and ct
template <typename... Args>
int operator()(cl::sycl::device* dev, Args... args) {
auto exception_handler = [](sycl::exception_list exceptions) {
auto exception_handler = [](cl::sycl::exception_list exceptions) {
for (std::exception_ptr const& e : exceptions) {
try {
std::rethrow_exception(e);
}
catch (sycl::exception const& e) {
catch (cl::sycl::exception const& e) {
std::cout << "Caught asynchronous SYCL exception during ASUM:\n"
<< e.what() << std::endl
<< "OpenCL status: " << e.get_cl_code() << std::endl;
Expand Down
1 change: 1 addition & 0 deletions tests/unit_tests/rng/include/statistics_check_test.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@

#define POISSON_ARGS 0.5

using namespace cl;
mmeterel marked this conversation as resolved.
Show resolved Hide resolved
template <typename Distr, typename Engine>
class statistics_test {
public:
Expand Down