diff --git a/deps/Project.toml b/deps/Project.toml index 91a254dbe..ab9d3bb4e 100644 --- a/deps/Project.toml +++ b/deps/Project.toml @@ -8,6 +8,7 @@ Ninja_jll = "76642167-d241-5cee-8c94-7a494e8cb7b7" Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" Preferences = "21216c6a-2e73-6563-6e65-726566657250" Scratch = "6c6a2e73-6563-6170-7368-637461726353" +TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76" oneAPI_Level_Zero_Headers_jll = "f4bc562b-d309-54f8-9efb-476e56f0410d" oneAPI_Support_Headers_jll = "24f86df5-245d-5634-a4cc-32433d9800b3" diff --git a/deps/generate_interfaces.jl b/deps/generate_interfaces.jl index 57df7e7b9..b539b7b94 100644 --- a/deps/generate_interfaces.jl +++ b/deps/generate_interfaces.jl @@ -4,6 +4,7 @@ # dims, explicit nnz) introduced in 2025.3, so the generated sources require oneMKL 2025.3 # or newer to build. import oneAPI_Support_Headers_jll +using TOML include("generate_helpers.jl") @@ -412,6 +413,44 @@ function format_decl(header) return String(take!(io)) end +# The Julia bindings' argument types (res/support.toml), as `wrap.jl` applies them. +const binding_types = TOML.parsefile(joinpath(@__DIR__, "..", "res", "support.toml"))["api"] + +function binding_argtypes(fn) + haskey(binding_types, fn) && return get(binding_types[fn], "argtypes", Dict()) + generic = "onemklX" * fn[8:end] + haskey(binding_types, generic) && return get(binding_types[generic], "argtypes", Dict()) + return Dict() +end + +# Whether a wrapper waits for the queue before returning. Most return as soon as oneMKL has +# submitted its work, and oneAPI.jl orders that work with what comes next (see `sycl_queue` +# and `mkl_wait!`). That relies on the Julia binding passing every pointer as a `ZePtr`, +# which records the task's stream as the user of the memory, or as a `Ref` to a scalar that +# the wrapper dereferences (marked `§` in `header`). Other wrappers wait: those taking host pointers (e.g. the +# scalar result of `dot`, or the parameter arrays of the grouped batch routines), the +# sparse routines, whose matrix handles refer to memory the binding doesn't see, and the +# factorizations returning `info` to LinearAlgebra. +function waits_for_queue(header, name, library) + occursin("scratchpad_size", name) && return false + library == "sparse" && return true + name in ("potrf", "getrf", "sytrf") && return true + fn = match(r" (onemkl\w+)\(", header)[1] + occursin("_batch", fn) && !endswith(fn, "_batch_strided") && return true + + argtypes = binding_argtypes(fn) + params = split(split(split(header, "(")[2], ")")[1], ",") + for (i, param) in enumerate(params) + typ = get(argtypes, string(i), "") + if occursin("*", param) + startswith(typ, "ZePtr") || return true + elseif occursin("§", param) + startswith(typ, "Ref{") || return true + end + end + return false +end + # Turn one parsed signature into the C function signature and the implementation body # (the text between the braces), so the caller can compose plain or version-guarded # definitions. @@ -463,6 +502,8 @@ function cpp_wrapper(header, name, version, type_routine, template, library) parameters = replace(parameters, Regex(", $type ([A-Za-z0-9_]+)") => SubstitutionString(", convert(\\1)")) end + wait = waits_for_queue(header, name, library) ? " device_queue->val.wait_and_throw();\n" : "" + # Pass scalars (e.g. alpha/beta inputs) as references instead of values header = replace(header, "§" => "*") parameters = replace(parameters, ", §" => ", *") @@ -491,11 +532,11 @@ function cpp_wrapper(header, name, version, type_routine, template, library) catch_clause = library == "lapack" ? lapack_catch : sycl_catch write(body, " try {\n") write(body, " auto status = oneapi::mkl::$library::$variant$name<$type>($parameters, {});\n") - write(body, " device_queue->val.wait_and_throw();\n") + write(body, wait) write(body, " } $catch_clause\n") end if occursin("scratchpad_size", name) - write(body, " int64_t scratchpad_size = oneapi::mkl::$library::$variant$name<$type>($parameters);\n device_queue->val.wait_and_throw();\n") + write(body, " int64_t scratchpad_size = oneapi::mkl::$library::$variant$name<$type>($parameters);\n") end else if !(name ∈ void_output) @@ -505,19 +546,16 @@ function cpp_wrapper(header, name, version, type_routine, template, library) catch_clause = library == "lapack" ? lapack_catch : sycl_catch write(body, " try {\n") write(body, " auto status = oneapi::mkl::$library::$variant$name($parameters, {});\n") - write(body, " device_queue->val.wait_and_throw();\n") + write(body, wait) write(body, " } $catch_clause\n") else write(body, " auto status = oneapi::mkl::$library::$variant$name($parameters, {});\n") - if has_queue - write(body, " device_queue->val.wait_and_throw();\n") - end end else if occursin("device_queue", parameters) write(body, " try {\n") write(body, " oneapi::mkl::$library::$variant$name($parameters);\n") - write(body, " device_queue->val.wait_and_throw();\n") + write(body, wait) write(body, " } $sycl_catch\n") else write(body, " oneapi::mkl::$library::$variant$name($parameters);\n") diff --git a/deps/onemkl_prologue.cpp b/deps/onemkl_prologue.cpp index 0dcd19bdb..7ee7d008a 100644 --- a/deps/onemkl_prologue.cpp +++ b/deps/onemkl_prologue.cpp @@ -404,7 +404,6 @@ extern "C" int onemklHgemm_batch(syclQueue_t device_queue, onemklTranspose trans int64_t *ldb, uint16_t *beta, short **c, int64_t *ldc, int64_t group_count, int64_t *group_size) { gemmBatchInfo gemmInfo(device_queue, group_count, transa, transb); - device_queue->val.wait_and_throw(); auto status = oneapi::mkl::blas::column_major::gemm_batch(device_queue->val, &gemmInfo.m_transa[0], &gemmInfo.m_transb[0], m, n, k, reinterpret_cast(alpha), @@ -423,7 +422,6 @@ extern "C" int onemklSgemm_batch(syclQueue_t device_queue, onemklTranspose trans int64_t *ldb, float *beta, float **c, int64_t *ldc, int64_t group_count, int64_t *group_size) { gemmBatchInfo gemmInfo(device_queue, group_count, transa, transb); - device_queue->val.wait_and_throw(); auto status = oneapi::mkl::blas::column_major::gemm_batch(device_queue->val, &gemmInfo.m_transa[0], &gemmInfo.m_transb[0], m, n, k, alpha, @@ -442,7 +440,6 @@ extern "C" int onemklDgemm_batch(syclQueue_t device_queue, onemklTranspose trans int64_t *ldb, double *beta, double **c, int64_t *ldc, int64_t group_count, int64_t *group_size) { gemmBatchInfo gemmInfo(device_queue, group_count, transa, transb); - device_queue->val.wait_and_throw(); auto status = oneapi::mkl::blas::column_major::gemm_batch(device_queue->val, &gemmInfo.m_transa[0], &gemmInfo.m_transb[0], m, n, k, alpha, @@ -462,7 +459,6 @@ extern "C" int onemklCgemm_batch(syclQueue_t device_queue, onemklTranspose trans int64_t *ldb, float _Complex *beta, float _Complex **c, int64_t *ldc, int64_t group_count, int64_t *group_size) { gemmBatchInfo gemmInfo(device_queue, group_count, transa, transb); - device_queue->val.wait_and_throw(); auto status = oneapi::mkl::blas::column_major::gemm_batch(device_queue->val, &gemmInfo.m_transa[0], &gemmInfo.m_transb[0], m, n, k, reinterpret_cast *>(alpha), @@ -486,7 +482,6 @@ extern "C" int onemklZgemm_batch(syclQueue_t device_queue, onemklTranspose trans double _Complex **c, int64_t *ldc, int64_t group_count, int64_t *group_size) { gemmBatchInfo gemmInfo(device_queue, group_count, transa, transb); - device_queue->val.wait_and_throw(); auto status = oneapi::mkl::blas::column_major::gemm_batch(device_queue->val, &gemmInfo.m_transa[0], &gemmInfo.m_transb[0], m, n, k, reinterpret_cast *>(alpha), @@ -508,8 +503,6 @@ extern "C" int onemklStrsm_batch(syclQueue_t device_queue, onemklSide left_right int64_t group_count, int64_t *group_size) { trsmBatchInfo trsmInfo(device_queue, left_right, upper_lower, transa, unit_diag, group_count); - device_queue->val.wait_and_throw(); - auto status = oneapi::mkl::blas::column_major::trsm_batch(device_queue->val, &trsmInfo.m_leftright[0], &trsmInfo.m_upperlower[0], &trsmInfo.m_transa[0], &trsmInfo.m_unitdiag[0], @@ -527,8 +520,6 @@ extern "C" int onemklDtrsm_batch(syclQueue_t device_queue, onemklSide left_right int64_t *group_size) { trsmBatchInfo trsmInfo(device_queue, left_right, upper_lower, transa, unit_diag, group_count); - device_queue->val.wait_and_throw(); - auto status = oneapi::mkl::blas::column_major::trsm_batch(device_queue->val, &trsmInfo.m_leftright[0], &trsmInfo.m_upperlower[0], &trsmInfo.m_transa[0], &trsmInfo.m_unitdiag[0], @@ -546,8 +537,6 @@ extern "C" int onemklCtrsm_batch(syclQueue_t device_queue, onemklSide left_right int64_t group_count, int64_t *group_size) { trsmBatchInfo trsmInfo(device_queue, left_right, upper_lower, transa, unit_diag, group_count); - device_queue->val.wait_and_throw(); - auto status = oneapi::mkl::blas::column_major::trsm_batch(device_queue->val, &trsmInfo.m_leftright[0], &trsmInfo.m_upperlower[0], &trsmInfo.m_transa[0], &trsmInfo.m_unitdiag[0], @@ -567,8 +556,6 @@ extern "C" int onemklZtrsm_batch(syclQueue_t device_queue, onemklSide left_right int64_t group_count, int64_t *group_size) { trsmBatchInfo trsmInfo(device_queue, left_right, upper_lower, transa, unit_diag, group_count); - device_queue->val.wait_and_throw(); - auto status = oneapi::mkl::blas::column_major::trsm_batch(device_queue->val, &trsmInfo.m_leftright[0], &trsmInfo.m_upperlower[0], &trsmInfo.m_transa[0], &trsmInfo.m_unitdiag[0], diff --git a/deps/src/onemkl.cpp b/deps/src/onemkl.cpp index 02dd53c27..6efe2b68b 100644 --- a/deps/src/onemkl.cpp +++ b/deps/src/onemkl.cpp @@ -404,7 +404,6 @@ extern "C" int onemklHgemm_batch(syclQueue_t device_queue, onemklTranspose trans int64_t *ldb, uint16_t *beta, short **c, int64_t *ldc, int64_t group_count, int64_t *group_size) { gemmBatchInfo gemmInfo(device_queue, group_count, transa, transb); - device_queue->val.wait_and_throw(); auto status = oneapi::mkl::blas::column_major::gemm_batch(device_queue->val, &gemmInfo.m_transa[0], &gemmInfo.m_transb[0], m, n, k, reinterpret_cast(alpha), @@ -423,7 +422,6 @@ extern "C" int onemklSgemm_batch(syclQueue_t device_queue, onemklTranspose trans int64_t *ldb, float *beta, float **c, int64_t *ldc, int64_t group_count, int64_t *group_size) { gemmBatchInfo gemmInfo(device_queue, group_count, transa, transb); - device_queue->val.wait_and_throw(); auto status = oneapi::mkl::blas::column_major::gemm_batch(device_queue->val, &gemmInfo.m_transa[0], &gemmInfo.m_transb[0], m, n, k, alpha, @@ -442,7 +440,6 @@ extern "C" int onemklDgemm_batch(syclQueue_t device_queue, onemklTranspose trans int64_t *ldb, double *beta, double **c, int64_t *ldc, int64_t group_count, int64_t *group_size) { gemmBatchInfo gemmInfo(device_queue, group_count, transa, transb); - device_queue->val.wait_and_throw(); auto status = oneapi::mkl::blas::column_major::gemm_batch(device_queue->val, &gemmInfo.m_transa[0], &gemmInfo.m_transb[0], m, n, k, alpha, @@ -462,7 +459,6 @@ extern "C" int onemklCgemm_batch(syclQueue_t device_queue, onemklTranspose trans int64_t *ldb, float _Complex *beta, float _Complex **c, int64_t *ldc, int64_t group_count, int64_t *group_size) { gemmBatchInfo gemmInfo(device_queue, group_count, transa, transb); - device_queue->val.wait_and_throw(); auto status = oneapi::mkl::blas::column_major::gemm_batch(device_queue->val, &gemmInfo.m_transa[0], &gemmInfo.m_transb[0], m, n, k, reinterpret_cast *>(alpha), @@ -486,7 +482,6 @@ extern "C" int onemklZgemm_batch(syclQueue_t device_queue, onemklTranspose trans double _Complex **c, int64_t *ldc, int64_t group_count, int64_t *group_size) { gemmBatchInfo gemmInfo(device_queue, group_count, transa, transb); - device_queue->val.wait_and_throw(); auto status = oneapi::mkl::blas::column_major::gemm_batch(device_queue->val, &gemmInfo.m_transa[0], &gemmInfo.m_transb[0], m, n, k, reinterpret_cast *>(alpha), @@ -508,8 +503,6 @@ extern "C" int onemklStrsm_batch(syclQueue_t device_queue, onemklSide left_right int64_t group_count, int64_t *group_size) { trsmBatchInfo trsmInfo(device_queue, left_right, upper_lower, transa, unit_diag, group_count); - device_queue->val.wait_and_throw(); - auto status = oneapi::mkl::blas::column_major::trsm_batch(device_queue->val, &trsmInfo.m_leftright[0], &trsmInfo.m_upperlower[0], &trsmInfo.m_transa[0], &trsmInfo.m_unitdiag[0], @@ -527,8 +520,6 @@ extern "C" int onemklDtrsm_batch(syclQueue_t device_queue, onemklSide left_right int64_t *group_size) { trsmBatchInfo trsmInfo(device_queue, left_right, upper_lower, transa, unit_diag, group_count); - device_queue->val.wait_and_throw(); - auto status = oneapi::mkl::blas::column_major::trsm_batch(device_queue->val, &trsmInfo.m_leftright[0], &trsmInfo.m_upperlower[0], &trsmInfo.m_transa[0], &trsmInfo.m_unitdiag[0], @@ -546,8 +537,6 @@ extern "C" int onemklCtrsm_batch(syclQueue_t device_queue, onemklSide left_right int64_t group_count, int64_t *group_size) { trsmBatchInfo trsmInfo(device_queue, left_right, upper_lower, transa, unit_diag, group_count); - device_queue->val.wait_and_throw(); - auto status = oneapi::mkl::blas::column_major::trsm_batch(device_queue->val, &trsmInfo.m_leftright[0], &trsmInfo.m_upperlower[0], &trsmInfo.m_transa[0], &trsmInfo.m_unitdiag[0], @@ -567,8 +556,6 @@ extern "C" int onemklZtrsm_batch(syclQueue_t device_queue, onemklSide left_right int64_t group_count, int64_t *group_size) { trsmBatchInfo trsmInfo(device_queue, left_right, upper_lower, transa, unit_diag, group_count); - device_queue->val.wait_and_throw(); - auto status = oneapi::mkl::blas::column_major::trsm_batch(device_queue->val, &trsmInfo.m_leftright[0], &trsmInfo.m_upperlower[0], &trsmInfo.m_transa[0], &trsmInfo.m_unitdiag[0], @@ -583,7 +570,6 @@ extern "C" int onemklZtrsm_batch(syclQueue_t device_queue, onemklSide left_right extern "C" int onemklHgemm(syclQueue_t device_queue, onemklTranspose transa, onemklTranspose transb, int64_t m, int64_t n, int64_t k, short *alpha, short *a, int64_t lda, short *b, int64_t ldb, short *beta, short *c, int64_t ldc) { try { auto status = oneapi::mkl::blas::column_major::gemm(device_queue->val, convert(transa), convert(transb), m, n, k, *reinterpret_cast(alpha), reinterpret_cast(a), lda, reinterpret_cast(b), ldb, *reinterpret_cast(beta), reinterpret_cast(c), ldc, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -591,7 +577,6 @@ extern "C" int onemklHgemm(syclQueue_t device_queue, onemklTranspose transa, one extern "C" int onemklSgemm(syclQueue_t device_queue, onemklTranspose transa, onemklTranspose transb, int64_t m, int64_t n, int64_t k, float *alpha, float *a, int64_t lda, float *b, int64_t ldb, float *beta, float *c, int64_t ldc) { try { auto status = oneapi::mkl::blas::column_major::gemm(device_queue->val, convert(transa), convert(transb), m, n, k, *alpha, a, lda, b, ldb, *beta, c, ldc, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -599,7 +584,6 @@ extern "C" int onemklSgemm(syclQueue_t device_queue, onemklTranspose transa, one extern "C" int onemklDgemm(syclQueue_t device_queue, onemklTranspose transa, onemklTranspose transb, int64_t m, int64_t n, int64_t k, double *alpha, double *a, int64_t lda, double *b, int64_t ldb, double *beta, double *c, int64_t ldc) { try { auto status = oneapi::mkl::blas::column_major::gemm(device_queue->val, convert(transa), convert(transb), m, n, k, *alpha, a, lda, b, ldb, *beta, c, ldc, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -607,7 +591,6 @@ extern "C" int onemklDgemm(syclQueue_t device_queue, onemklTranspose transa, one extern "C" int onemklCgemm(syclQueue_t device_queue, onemklTranspose transa, onemklTranspose transb, int64_t m, int64_t n, int64_t k, float _Complex *alpha, float _Complex *a, int64_t lda, float _Complex *b, int64_t ldb, float _Complex *beta, float _Complex *c, int64_t ldc) { try { auto status = oneapi::mkl::blas::column_major::gemm(device_queue->val, convert(transa), convert(transb), m, n, k, *reinterpret_cast*>(alpha), reinterpret_cast*>(a), lda, reinterpret_cast*>(b), ldb, *reinterpret_cast*>(beta), reinterpret_cast*>(c), ldc, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -615,7 +598,6 @@ extern "C" int onemklCgemm(syclQueue_t device_queue, onemklTranspose transa, one extern "C" int onemklZgemm(syclQueue_t device_queue, onemklTranspose transa, onemklTranspose transb, int64_t m, int64_t n, int64_t k, double _Complex *alpha, double _Complex *a, int64_t lda, double _Complex *b, int64_t ldb, double _Complex *beta, double _Complex *c, int64_t ldc) { try { auto status = oneapi::mkl::blas::column_major::gemm(device_queue->val, convert(transa), convert(transb), m, n, k, *reinterpret_cast*>(alpha), reinterpret_cast*>(a), lda, reinterpret_cast*>(b), ldb, *reinterpret_cast*>(beta), reinterpret_cast*>(c), ldc, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -623,7 +605,6 @@ extern "C" int onemklZgemm(syclQueue_t device_queue, onemklTranspose transa, one extern "C" int onemklSsymm(syclQueue_t device_queue, onemklSide left_right, onemklUplo upper_lower, int64_t m, int64_t n, float *alpha, float *a, int64_t lda, float *b, int64_t ldb, float *beta, float *c, int64_t ldc) { try { auto status = oneapi::mkl::blas::column_major::symm(device_queue->val, convert(left_right), convert(upper_lower), m, n, *alpha, a, lda, b, ldb, *beta, c, ldc, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -631,7 +612,6 @@ extern "C" int onemklSsymm(syclQueue_t device_queue, onemklSide left_right, onem extern "C" int onemklDsymm(syclQueue_t device_queue, onemklSide left_right, onemklUplo upper_lower, int64_t m, int64_t n, double *alpha, double *a, int64_t lda, double *b, int64_t ldb, double *beta, double *c, int64_t ldc) { try { auto status = oneapi::mkl::blas::column_major::symm(device_queue->val, convert(left_right), convert(upper_lower), m, n, *alpha, a, lda, b, ldb, *beta, c, ldc, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -639,7 +619,6 @@ extern "C" int onemklDsymm(syclQueue_t device_queue, onemklSide left_right, onem extern "C" int onemklCsymm(syclQueue_t device_queue, onemklSide left_right, onemklUplo upper_lower, int64_t m, int64_t n, float _Complex *alpha, float _Complex *a, int64_t lda, float _Complex *b, int64_t ldb, float _Complex *beta, float _Complex *c, int64_t ldc) { try { auto status = oneapi::mkl::blas::column_major::symm(device_queue->val, convert(left_right), convert(upper_lower), m, n, *reinterpret_cast*>(alpha), reinterpret_cast*>(a), lda, reinterpret_cast*>(b), ldb, *reinterpret_cast*>(beta), reinterpret_cast*>(c), ldc, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -647,7 +626,6 @@ extern "C" int onemklCsymm(syclQueue_t device_queue, onemklSide left_right, onem extern "C" int onemklZsymm(syclQueue_t device_queue, onemklSide left_right, onemklUplo upper_lower, int64_t m, int64_t n, double _Complex *alpha, double _Complex *a, int64_t lda, double _Complex *b, int64_t ldb, double _Complex *beta, double _Complex *c, int64_t ldc) { try { auto status = oneapi::mkl::blas::column_major::symm(device_queue->val, convert(left_right), convert(upper_lower), m, n, *reinterpret_cast*>(alpha), reinterpret_cast*>(a), lda, reinterpret_cast*>(b), ldb, *reinterpret_cast*>(beta), reinterpret_cast*>(c), ldc, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -655,7 +633,6 @@ extern "C" int onemklZsymm(syclQueue_t device_queue, onemklSide left_right, onem extern "C" int onemklChemm(syclQueue_t device_queue, onemklSide left_right, onemklUplo upper_lower, int64_t m, int64_t n, float _Complex *alpha, float _Complex *a, int64_t lda, float _Complex *b, int64_t ldb, float _Complex *beta, float _Complex *c, int64_t ldc) { try { auto status = oneapi::mkl::blas::column_major::hemm(device_queue->val, convert(left_right), convert(upper_lower), m, n, *reinterpret_cast*>(alpha), reinterpret_cast*>(a), lda, reinterpret_cast*>(b), ldb, *reinterpret_cast*>(beta), reinterpret_cast*>(c), ldc, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -663,7 +640,6 @@ extern "C" int onemklChemm(syclQueue_t device_queue, onemklSide left_right, onem extern "C" int onemklZhemm(syclQueue_t device_queue, onemklSide left_right, onemklUplo upper_lower, int64_t m, int64_t n, double _Complex *alpha, double _Complex *a, int64_t lda, double _Complex *b, int64_t ldb, double _Complex *beta, double _Complex *c, int64_t ldc) { try { auto status = oneapi::mkl::blas::column_major::hemm(device_queue->val, convert(left_right), convert(upper_lower), m, n, *reinterpret_cast*>(alpha), reinterpret_cast*>(a), lda, reinterpret_cast*>(b), ldb, *reinterpret_cast*>(beta), reinterpret_cast*>(c), ldc, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -671,7 +647,6 @@ extern "C" int onemklZhemm(syclQueue_t device_queue, onemklSide left_right, onem extern "C" int onemklSsyrk(syclQueue_t device_queue, onemklUplo upper_lower, onemklTranspose trans, int64_t n, int64_t k, float *alpha, float *a, int64_t lda, float *beta, float *c, int64_t ldc) { try { auto status = oneapi::mkl::blas::column_major::syrk(device_queue->val, convert(upper_lower), convert(trans), n, k, *alpha, a, lda, *beta, c, ldc, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -679,7 +654,6 @@ extern "C" int onemklSsyrk(syclQueue_t device_queue, onemklUplo upper_lower, one extern "C" int onemklDsyrk(syclQueue_t device_queue, onemklUplo upper_lower, onemklTranspose trans, int64_t n, int64_t k, double *alpha, double *a, int64_t lda, double *beta, double *c, int64_t ldc) { try { auto status = oneapi::mkl::blas::column_major::syrk(device_queue->val, convert(upper_lower), convert(trans), n, k, *alpha, a, lda, *beta, c, ldc, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -687,7 +661,6 @@ extern "C" int onemklDsyrk(syclQueue_t device_queue, onemklUplo upper_lower, one extern "C" int onemklCsyrk(syclQueue_t device_queue, onemklUplo upper_lower, onemklTranspose trans, int64_t n, int64_t k, float _Complex *alpha, float _Complex *a, int64_t lda, float _Complex *beta, float _Complex *c, int64_t ldc) { try { auto status = oneapi::mkl::blas::column_major::syrk(device_queue->val, convert(upper_lower), convert(trans), n, k, *reinterpret_cast*>(alpha), reinterpret_cast*>(a), lda, *reinterpret_cast*>(beta), reinterpret_cast*>(c), ldc, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -695,7 +668,6 @@ extern "C" int onemklCsyrk(syclQueue_t device_queue, onemklUplo upper_lower, one extern "C" int onemklZsyrk(syclQueue_t device_queue, onemklUplo upper_lower, onemklTranspose trans, int64_t n, int64_t k, double _Complex *alpha, double _Complex *a, int64_t lda, double _Complex *beta, double _Complex *c, int64_t ldc) { try { auto status = oneapi::mkl::blas::column_major::syrk(device_queue->val, convert(upper_lower), convert(trans), n, k, *reinterpret_cast*>(alpha), reinterpret_cast*>(a), lda, *reinterpret_cast*>(beta), reinterpret_cast*>(c), ldc, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -703,7 +675,6 @@ extern "C" int onemklZsyrk(syclQueue_t device_queue, onemklUplo upper_lower, one extern "C" int onemklCherk(syclQueue_t device_queue, onemklUplo upper_lower, onemklTranspose trans, int64_t n, int64_t k, float *alpha, float _Complex *a, int64_t lda, float *beta, float _Complex *c, int64_t ldc) { try { auto status = oneapi::mkl::blas::column_major::herk(device_queue->val, convert(upper_lower), convert(trans), n, k, *alpha, reinterpret_cast*>(a), lda, *beta, reinterpret_cast*>(c), ldc, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -711,7 +682,6 @@ extern "C" int onemklCherk(syclQueue_t device_queue, onemklUplo upper_lower, one extern "C" int onemklZherk(syclQueue_t device_queue, onemklUplo upper_lower, onemklTranspose trans, int64_t n, int64_t k, double *alpha, double _Complex *a, int64_t lda, double *beta, double _Complex *c, int64_t ldc) { try { auto status = oneapi::mkl::blas::column_major::herk(device_queue->val, convert(upper_lower), convert(trans), n, k, *alpha, reinterpret_cast*>(a), lda, *beta, reinterpret_cast*>(c), ldc, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -719,7 +689,6 @@ extern "C" int onemklZherk(syclQueue_t device_queue, onemklUplo upper_lower, one extern "C" int onemklSsyr2k(syclQueue_t device_queue, onemklUplo upper_lower, onemklTranspose trans, int64_t n, int64_t k, float *alpha, float *a, int64_t lda, float *b, int64_t ldb, float *beta, float *c, int64_t ldc) { try { auto status = oneapi::mkl::blas::column_major::syr2k(device_queue->val, convert(upper_lower), convert(trans), n, k, *alpha, a, lda, b, ldb, *beta, c, ldc, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -727,7 +696,6 @@ extern "C" int onemklSsyr2k(syclQueue_t device_queue, onemklUplo upper_lower, on extern "C" int onemklDsyr2k(syclQueue_t device_queue, onemklUplo upper_lower, onemklTranspose trans, int64_t n, int64_t k, double *alpha, double *a, int64_t lda, double *b, int64_t ldb, double *beta, double *c, int64_t ldc) { try { auto status = oneapi::mkl::blas::column_major::syr2k(device_queue->val, convert(upper_lower), convert(trans), n, k, *alpha, a, lda, b, ldb, *beta, c, ldc, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -735,7 +703,6 @@ extern "C" int onemklDsyr2k(syclQueue_t device_queue, onemklUplo upper_lower, on extern "C" int onemklCsyr2k(syclQueue_t device_queue, onemklUplo upper_lower, onemklTranspose trans, int64_t n, int64_t k, float _Complex *alpha, float _Complex *a, int64_t lda, float _Complex *b, int64_t ldb, float _Complex *beta, float _Complex *c, int64_t ldc) { try { auto status = oneapi::mkl::blas::column_major::syr2k(device_queue->val, convert(upper_lower), convert(trans), n, k, *reinterpret_cast*>(alpha), reinterpret_cast*>(a), lda, reinterpret_cast*>(b), ldb, *reinterpret_cast*>(beta), reinterpret_cast*>(c), ldc, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -743,7 +710,6 @@ extern "C" int onemklCsyr2k(syclQueue_t device_queue, onemklUplo upper_lower, on extern "C" int onemklZsyr2k(syclQueue_t device_queue, onemklUplo upper_lower, onemklTranspose trans, int64_t n, int64_t k, double _Complex *alpha, double _Complex *a, int64_t lda, double _Complex *b, int64_t ldb, double _Complex *beta, double _Complex *c, int64_t ldc) { try { auto status = oneapi::mkl::blas::column_major::syr2k(device_queue->val, convert(upper_lower), convert(trans), n, k, *reinterpret_cast*>(alpha), reinterpret_cast*>(a), lda, reinterpret_cast*>(b), ldb, *reinterpret_cast*>(beta), reinterpret_cast*>(c), ldc, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -751,7 +717,6 @@ extern "C" int onemklZsyr2k(syclQueue_t device_queue, onemklUplo upper_lower, on extern "C" int onemklCher2k(syclQueue_t device_queue, onemklUplo upper_lower, onemklTranspose trans, int64_t n, int64_t k, float _Complex *alpha, float _Complex *a, int64_t lda, float _Complex *b, int64_t ldb, float *beta, float _Complex *c, int64_t ldc) { try { auto status = oneapi::mkl::blas::column_major::her2k(device_queue->val, convert(upper_lower), convert(trans), n, k, *reinterpret_cast*>(alpha), reinterpret_cast*>(a), lda, reinterpret_cast*>(b), ldb, *beta, reinterpret_cast*>(c), ldc, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -759,7 +724,6 @@ extern "C" int onemklCher2k(syclQueue_t device_queue, onemklUplo upper_lower, on extern "C" int onemklZher2k(syclQueue_t device_queue, onemklUplo upper_lower, onemklTranspose trans, int64_t n, int64_t k, double _Complex *alpha, double _Complex *a, int64_t lda, double _Complex *b, int64_t ldb, double *beta, double _Complex *c, int64_t ldc) { try { auto status = oneapi::mkl::blas::column_major::her2k(device_queue->val, convert(upper_lower), convert(trans), n, k, *reinterpret_cast*>(alpha), reinterpret_cast*>(a), lda, reinterpret_cast*>(b), ldb, *beta, reinterpret_cast*>(c), ldc, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -767,7 +731,6 @@ extern "C" int onemklZher2k(syclQueue_t device_queue, onemklUplo upper_lower, on extern "C" int onemklStrmm(syclQueue_t device_queue, onemklSide left_right, onemklUplo upper_lower, onemklTranspose trans, onemklDiag unit_diag, int64_t m, int64_t n, float *alpha, float *a, int64_t lda, float *b, int64_t ldb) { try { auto status = oneapi::mkl::blas::column_major::trmm(device_queue->val, convert(left_right), convert(upper_lower), convert(trans), convert(unit_diag), m, n, *alpha, a, lda, b, ldb, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -775,7 +738,6 @@ extern "C" int onemklStrmm(syclQueue_t device_queue, onemklSide left_right, onem extern "C" int onemklDtrmm(syclQueue_t device_queue, onemklSide left_right, onemklUplo upper_lower, onemklTranspose trans, onemklDiag unit_diag, int64_t m, int64_t n, double *alpha, double *a, int64_t lda, double *b, int64_t ldb) { try { auto status = oneapi::mkl::blas::column_major::trmm(device_queue->val, convert(left_right), convert(upper_lower), convert(trans), convert(unit_diag), m, n, *alpha, a, lda, b, ldb, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -783,7 +745,6 @@ extern "C" int onemklDtrmm(syclQueue_t device_queue, onemklSide left_right, onem extern "C" int onemklCtrmm(syclQueue_t device_queue, onemklSide left_right, onemklUplo upper_lower, onemklTranspose trans, onemklDiag unit_diag, int64_t m, int64_t n, float _Complex *alpha, float _Complex *a, int64_t lda, float _Complex *b, int64_t ldb) { try { auto status = oneapi::mkl::blas::column_major::trmm(device_queue->val, convert(left_right), convert(upper_lower), convert(trans), convert(unit_diag), m, n, *reinterpret_cast*>(alpha), reinterpret_cast*>(a), lda, reinterpret_cast*>(b), ldb, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -791,7 +752,6 @@ extern "C" int onemklCtrmm(syclQueue_t device_queue, onemklSide left_right, onem extern "C" int onemklZtrmm(syclQueue_t device_queue, onemklSide left_right, onemklUplo upper_lower, onemklTranspose trans, onemklDiag unit_diag, int64_t m, int64_t n, double _Complex *alpha, double _Complex *a, int64_t lda, double _Complex *b, int64_t ldb) { try { auto status = oneapi::mkl::blas::column_major::trmm(device_queue->val, convert(left_right), convert(upper_lower), convert(trans), convert(unit_diag), m, n, *reinterpret_cast*>(alpha), reinterpret_cast*>(a), lda, reinterpret_cast*>(b), ldb, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -799,7 +759,6 @@ extern "C" int onemklZtrmm(syclQueue_t device_queue, onemklSide left_right, onem extern "C" int onemklStrmm_variant(syclQueue_t device_queue, onemklSide left_right, onemklUplo upper_lower, onemklTranspose trans, onemklDiag unit_diag, int64_t m, int64_t n, float *alpha, float *a, int64_t lda, float *b, int64_t ldb, float *beta, float *c, int64_t ldc) { try { auto status = oneapi::mkl::blas::column_major::trmm(device_queue->val, convert(left_right), convert(upper_lower), convert(trans), convert(unit_diag), m, n, *alpha, a, lda, b, ldb, *beta, c, ldc, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -807,7 +766,6 @@ extern "C" int onemklStrmm_variant(syclQueue_t device_queue, onemklSide left_rig extern "C" int onemklDtrmm_variant(syclQueue_t device_queue, onemklSide left_right, onemklUplo upper_lower, onemklTranspose trans, onemklDiag unit_diag, int64_t m, int64_t n, double *alpha, double *a, int64_t lda, double *b, int64_t ldb, double *beta, double *c, int64_t ldc) { try { auto status = oneapi::mkl::blas::column_major::trmm(device_queue->val, convert(left_right), convert(upper_lower), convert(trans), convert(unit_diag), m, n, *alpha, a, lda, b, ldb, *beta, c, ldc, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -815,7 +773,6 @@ extern "C" int onemklDtrmm_variant(syclQueue_t device_queue, onemklSide left_rig extern "C" int onemklCtrmm_variant(syclQueue_t device_queue, onemklSide left_right, onemklUplo upper_lower, onemklTranspose trans, onemklDiag unit_diag, int64_t m, int64_t n, float _Complex *alpha, float _Complex *a, int64_t lda, float _Complex *b, int64_t ldb, float _Complex *beta, float _Complex *c, int64_t ldc) { try { auto status = oneapi::mkl::blas::column_major::trmm(device_queue->val, convert(left_right), convert(upper_lower), convert(trans), convert(unit_diag), m, n, *reinterpret_cast*>(alpha), reinterpret_cast*>(a), lda, reinterpret_cast*>(b), ldb, *reinterpret_cast*>(beta), reinterpret_cast*>(c), ldc, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -823,7 +780,6 @@ extern "C" int onemklCtrmm_variant(syclQueue_t device_queue, onemklSide left_rig extern "C" int onemklZtrmm_variant(syclQueue_t device_queue, onemklSide left_right, onemklUplo upper_lower, onemklTranspose trans, onemklDiag unit_diag, int64_t m, int64_t n, double _Complex *alpha, double _Complex *a, int64_t lda, double _Complex *b, int64_t ldb, double _Complex *beta, double _Complex *c, int64_t ldc) { try { auto status = oneapi::mkl::blas::column_major::trmm(device_queue->val, convert(left_right), convert(upper_lower), convert(trans), convert(unit_diag), m, n, *reinterpret_cast*>(alpha), reinterpret_cast*>(a), lda, reinterpret_cast*>(b), ldb, *reinterpret_cast*>(beta), reinterpret_cast*>(c), ldc, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -831,7 +787,6 @@ extern "C" int onemklZtrmm_variant(syclQueue_t device_queue, onemklSide left_rig extern "C" int onemklStrsm(syclQueue_t device_queue, onemklSide left_right, onemklUplo upper_lower, onemklTranspose trans, onemklDiag unit_diag, int64_t m, int64_t n, float *alpha, float *a, int64_t lda, float *b, int64_t ldb) { try { auto status = oneapi::mkl::blas::column_major::trsm(device_queue->val, convert(left_right), convert(upper_lower), convert(trans), convert(unit_diag), m, n, *alpha, a, lda, b, ldb, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -839,7 +794,6 @@ extern "C" int onemklStrsm(syclQueue_t device_queue, onemklSide left_right, onem extern "C" int onemklDtrsm(syclQueue_t device_queue, onemklSide left_right, onemklUplo upper_lower, onemklTranspose trans, onemklDiag unit_diag, int64_t m, int64_t n, double *alpha, double *a, int64_t lda, double *b, int64_t ldb) { try { auto status = oneapi::mkl::blas::column_major::trsm(device_queue->val, convert(left_right), convert(upper_lower), convert(trans), convert(unit_diag), m, n, *alpha, a, lda, b, ldb, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -847,7 +801,6 @@ extern "C" int onemklDtrsm(syclQueue_t device_queue, onemklSide left_right, onem extern "C" int onemklCtrsm(syclQueue_t device_queue, onemklSide left_right, onemklUplo upper_lower, onemklTranspose trans, onemklDiag unit_diag, int64_t m, int64_t n, float _Complex *alpha, float _Complex *a, int64_t lda, float _Complex *b, int64_t ldb) { try { auto status = oneapi::mkl::blas::column_major::trsm(device_queue->val, convert(left_right), convert(upper_lower), convert(trans), convert(unit_diag), m, n, *reinterpret_cast*>(alpha), reinterpret_cast*>(a), lda, reinterpret_cast*>(b), ldb, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -855,7 +808,6 @@ extern "C" int onemklCtrsm(syclQueue_t device_queue, onemklSide left_right, onem extern "C" int onemklZtrsm(syclQueue_t device_queue, onemklSide left_right, onemklUplo upper_lower, onemklTranspose trans, onemklDiag unit_diag, int64_t m, int64_t n, double _Complex *alpha, double _Complex *a, int64_t lda, double _Complex *b, int64_t ldb) { try { auto status = oneapi::mkl::blas::column_major::trsm(device_queue->val, convert(left_right), convert(upper_lower), convert(trans), convert(unit_diag), m, n, *reinterpret_cast*>(alpha), reinterpret_cast*>(a), lda, reinterpret_cast*>(b), ldb, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -863,7 +815,6 @@ extern "C" int onemklZtrsm(syclQueue_t device_queue, onemklSide left_right, onem extern "C" int onemklStrsm_variant(syclQueue_t device_queue, onemklSide left_right, onemklUplo upper_lower, onemklTranspose trans, onemklDiag unit_diag, int64_t m, int64_t n, float *alpha, float *a, int64_t lda, float *b, int64_t ldb, float *beta, float *c, int64_t ldc) { try { auto status = oneapi::mkl::blas::column_major::trsm(device_queue->val, convert(left_right), convert(upper_lower), convert(trans), convert(unit_diag), m, n, *alpha, a, lda, b, ldb, *beta, c, ldc, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -871,7 +822,6 @@ extern "C" int onemklStrsm_variant(syclQueue_t device_queue, onemklSide left_rig extern "C" int onemklDtrsm_variant(syclQueue_t device_queue, onemklSide left_right, onemklUplo upper_lower, onemklTranspose trans, onemklDiag unit_diag, int64_t m, int64_t n, double *alpha, double *a, int64_t lda, double *b, int64_t ldb, double *beta, double *c, int64_t ldc) { try { auto status = oneapi::mkl::blas::column_major::trsm(device_queue->val, convert(left_right), convert(upper_lower), convert(trans), convert(unit_diag), m, n, *alpha, a, lda, b, ldb, *beta, c, ldc, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -879,7 +829,6 @@ extern "C" int onemklDtrsm_variant(syclQueue_t device_queue, onemklSide left_rig extern "C" int onemklCtrsm_variant(syclQueue_t device_queue, onemklSide left_right, onemklUplo upper_lower, onemklTranspose trans, onemklDiag unit_diag, int64_t m, int64_t n, float _Complex *alpha, float _Complex *a, int64_t lda, float _Complex *b, int64_t ldb, float _Complex *beta, float _Complex *c, int64_t ldc) { try { auto status = oneapi::mkl::blas::column_major::trsm(device_queue->val, convert(left_right), convert(upper_lower), convert(trans), convert(unit_diag), m, n, *reinterpret_cast*>(alpha), reinterpret_cast*>(a), lda, reinterpret_cast*>(b), ldb, *reinterpret_cast*>(beta), reinterpret_cast*>(c), ldc, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -887,7 +836,6 @@ extern "C" int onemklCtrsm_variant(syclQueue_t device_queue, onemklSide left_rig extern "C" int onemklZtrsm_variant(syclQueue_t device_queue, onemklSide left_right, onemklUplo upper_lower, onemklTranspose trans, onemklDiag unit_diag, int64_t m, int64_t n, double _Complex *alpha, double _Complex *a, int64_t lda, double _Complex *b, int64_t ldb, double _Complex *beta, double _Complex *c, int64_t ldc) { try { auto status = oneapi::mkl::blas::column_major::trsm(device_queue->val, convert(left_right), convert(upper_lower), convert(trans), convert(unit_diag), m, n, *reinterpret_cast*>(alpha), reinterpret_cast*>(a), lda, reinterpret_cast*>(b), ldb, *reinterpret_cast*>(beta), reinterpret_cast*>(c), ldc, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -895,7 +843,6 @@ extern "C" int onemklZtrsm_variant(syclQueue_t device_queue, onemklSide left_rig extern "C" int onemklSdgmm(syclQueue_t device_queue, onemklSide left_right, int64_t m, int64_t n, float *a, int64_t lda, float *x, int64_t incx, float *c, int64_t ldc) { try { auto status = oneapi::mkl::blas::column_major::dgmm(device_queue->val, convert(left_right), m, n, a, lda, x, incx, c, ldc, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -903,7 +850,6 @@ extern "C" int onemklSdgmm(syclQueue_t device_queue, onemklSide left_right, int6 extern "C" int onemklDdgmm(syclQueue_t device_queue, onemklSide left_right, int64_t m, int64_t n, double *a, int64_t lda, double *x, int64_t incx, double *c, int64_t ldc) { try { auto status = oneapi::mkl::blas::column_major::dgmm(device_queue->val, convert(left_right), m, n, a, lda, x, incx, c, ldc, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -911,7 +857,6 @@ extern "C" int onemklDdgmm(syclQueue_t device_queue, onemklSide left_right, int6 extern "C" int onemklCdgmm(syclQueue_t device_queue, onemklSide left_right, int64_t m, int64_t n, float _Complex *a, int64_t lda, float _Complex *x, int64_t incx, float _Complex *c, int64_t ldc) { try { auto status = oneapi::mkl::blas::column_major::dgmm(device_queue->val, convert(left_right), m, n, reinterpret_cast*>(a), lda, reinterpret_cast*>(x), incx, reinterpret_cast*>(c), ldc, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -919,7 +864,6 @@ extern "C" int onemklCdgmm(syclQueue_t device_queue, onemklSide left_right, int6 extern "C" int onemklZdgmm(syclQueue_t device_queue, onemklSide left_right, int64_t m, int64_t n, double _Complex *a, int64_t lda, double _Complex *x, int64_t incx, double _Complex *c, int64_t ldc) { try { auto status = oneapi::mkl::blas::column_major::dgmm(device_queue->val, convert(left_right), m, n, reinterpret_cast*>(a), lda, reinterpret_cast*>(x), incx, reinterpret_cast*>(c), ldc, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -927,7 +871,6 @@ extern "C" int onemklZdgmm(syclQueue_t device_queue, onemklSide left_right, int6 extern "C" int onemklSgemv(syclQueue_t device_queue, onemklTranspose trans, int64_t m, int64_t n, float *alpha, float *a, int64_t lda, float *x, int64_t incx, float *beta, float *y, int64_t incy) { try { auto status = oneapi::mkl::blas::column_major::gemv(device_queue->val, convert(trans), m, n, *alpha, a, lda, x, incx, *beta, y, incy, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -935,7 +878,6 @@ extern "C" int onemklSgemv(syclQueue_t device_queue, onemklTranspose trans, int6 extern "C" int onemklDgemv(syclQueue_t device_queue, onemklTranspose trans, int64_t m, int64_t n, double *alpha, double *a, int64_t lda, double *x, int64_t incx, double *beta, double *y, int64_t incy) { try { auto status = oneapi::mkl::blas::column_major::gemv(device_queue->val, convert(trans), m, n, *alpha, a, lda, x, incx, *beta, y, incy, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -943,7 +885,6 @@ extern "C" int onemklDgemv(syclQueue_t device_queue, onemklTranspose trans, int6 extern "C" int onemklCgemv(syclQueue_t device_queue, onemklTranspose trans, int64_t m, int64_t n, float _Complex *alpha, float _Complex *a, int64_t lda, float _Complex *x, int64_t incx, float _Complex *beta, float _Complex *y, int64_t incy) { try { auto status = oneapi::mkl::blas::column_major::gemv(device_queue->val, convert(trans), m, n, *reinterpret_cast*>(alpha), reinterpret_cast*>(a), lda, reinterpret_cast*>(x), incx, *reinterpret_cast*>(beta), reinterpret_cast*>(y), incy, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -951,7 +892,6 @@ extern "C" int onemklCgemv(syclQueue_t device_queue, onemklTranspose trans, int6 extern "C" int onemklZgemv(syclQueue_t device_queue, onemklTranspose trans, int64_t m, int64_t n, double _Complex *alpha, double _Complex *a, int64_t lda, double _Complex *x, int64_t incx, double _Complex *beta, double _Complex *y, int64_t incy) { try { auto status = oneapi::mkl::blas::column_major::gemv(device_queue->val, convert(trans), m, n, *reinterpret_cast*>(alpha), reinterpret_cast*>(a), lda, reinterpret_cast*>(x), incx, *reinterpret_cast*>(beta), reinterpret_cast*>(y), incy, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -959,7 +899,6 @@ extern "C" int onemklZgemv(syclQueue_t device_queue, onemklTranspose trans, int6 extern "C" int onemklSgbmv(syclQueue_t device_queue, onemklTranspose trans, int64_t m, int64_t n, int64_t kl, int64_t ku, float *alpha, float *a, int64_t lda, float *x, int64_t incx, float *beta, float *y, int64_t incy) { try { auto status = oneapi::mkl::blas::column_major::gbmv(device_queue->val, convert(trans), m, n, kl, ku, *alpha, a, lda, x, incx, *beta, y, incy, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -967,7 +906,6 @@ extern "C" int onemklSgbmv(syclQueue_t device_queue, onemklTranspose trans, int6 extern "C" int onemklDgbmv(syclQueue_t device_queue, onemklTranspose trans, int64_t m, int64_t n, int64_t kl, int64_t ku, double *alpha, double *a, int64_t lda, double *x, int64_t incx, double *beta, double *y, int64_t incy) { try { auto status = oneapi::mkl::blas::column_major::gbmv(device_queue->val, convert(trans), m, n, kl, ku, *alpha, a, lda, x, incx, *beta, y, incy, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -975,7 +913,6 @@ extern "C" int onemklDgbmv(syclQueue_t device_queue, onemklTranspose trans, int6 extern "C" int onemklCgbmv(syclQueue_t device_queue, onemklTranspose trans, int64_t m, int64_t n, int64_t kl, int64_t ku, float _Complex *alpha, float _Complex *a, int64_t lda, float _Complex *x, int64_t incx, float _Complex *beta, float _Complex *y, int64_t incy) { try { auto status = oneapi::mkl::blas::column_major::gbmv(device_queue->val, convert(trans), m, n, kl, ku, *reinterpret_cast*>(alpha), reinterpret_cast*>(a), lda, reinterpret_cast*>(x), incx, *reinterpret_cast*>(beta), reinterpret_cast*>(y), incy, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -983,7 +920,6 @@ extern "C" int onemklCgbmv(syclQueue_t device_queue, onemklTranspose trans, int6 extern "C" int onemklZgbmv(syclQueue_t device_queue, onemklTranspose trans, int64_t m, int64_t n, int64_t kl, int64_t ku, double _Complex *alpha, double _Complex *a, int64_t lda, double _Complex *x, int64_t incx, double _Complex *beta, double _Complex *y, int64_t incy) { try { auto status = oneapi::mkl::blas::column_major::gbmv(device_queue->val, convert(trans), m, n, kl, ku, *reinterpret_cast*>(alpha), reinterpret_cast*>(a), lda, reinterpret_cast*>(x), incx, *reinterpret_cast*>(beta), reinterpret_cast*>(y), incy, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -991,7 +927,6 @@ extern "C" int onemklZgbmv(syclQueue_t device_queue, onemklTranspose trans, int6 extern "C" int onemklSger(syclQueue_t device_queue, int64_t m, int64_t n, float *alpha, float *x, int64_t incx, float *y, int64_t incy, float *a, int64_t lda) { try { auto status = oneapi::mkl::blas::column_major::ger(device_queue->val, m, n, *alpha, x, incx, y, incy, a, lda, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -999,7 +934,6 @@ extern "C" int onemklSger(syclQueue_t device_queue, int64_t m, int64_t n, float extern "C" int onemklDger(syclQueue_t device_queue, int64_t m, int64_t n, double *alpha, double *x, int64_t incx, double *y, int64_t incy, double *a, int64_t lda) { try { auto status = oneapi::mkl::blas::column_major::ger(device_queue->val, m, n, *alpha, x, incx, y, incy, a, lda, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1007,7 +941,6 @@ extern "C" int onemklDger(syclQueue_t device_queue, int64_t m, int64_t n, double extern "C" int onemklCgerc(syclQueue_t device_queue, int64_t m, int64_t n, float _Complex *alpha, float _Complex *x, int64_t incx, float _Complex *y, int64_t incy, float _Complex *a, int64_t lda) { try { auto status = oneapi::mkl::blas::column_major::gerc(device_queue->val, m, n, *reinterpret_cast*>(alpha), reinterpret_cast*>(x), incx, reinterpret_cast*>(y), incy, reinterpret_cast*>(a), lda, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1015,7 +948,6 @@ extern "C" int onemklCgerc(syclQueue_t device_queue, int64_t m, int64_t n, float extern "C" int onemklZgerc(syclQueue_t device_queue, int64_t m, int64_t n, double _Complex *alpha, double _Complex *x, int64_t incx, double _Complex *y, int64_t incy, double _Complex *a, int64_t lda) { try { auto status = oneapi::mkl::blas::column_major::gerc(device_queue->val, m, n, *reinterpret_cast*>(alpha), reinterpret_cast*>(x), incx, reinterpret_cast*>(y), incy, reinterpret_cast*>(a), lda, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1023,7 +955,6 @@ extern "C" int onemklZgerc(syclQueue_t device_queue, int64_t m, int64_t n, doubl extern "C" int onemklCgeru(syclQueue_t device_queue, int64_t m, int64_t n, float _Complex *alpha, float _Complex *x, int64_t incx, float _Complex *y, int64_t incy, float _Complex *a, int64_t lda) { try { auto status = oneapi::mkl::blas::column_major::geru(device_queue->val, m, n, *reinterpret_cast*>(alpha), reinterpret_cast*>(x), incx, reinterpret_cast*>(y), incy, reinterpret_cast*>(a), lda, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1031,7 +962,6 @@ extern "C" int onemklCgeru(syclQueue_t device_queue, int64_t m, int64_t n, float extern "C" int onemklZgeru(syclQueue_t device_queue, int64_t m, int64_t n, double _Complex *alpha, double _Complex *x, int64_t incx, double _Complex *y, int64_t incy, double _Complex *a, int64_t lda) { try { auto status = oneapi::mkl::blas::column_major::geru(device_queue->val, m, n, *reinterpret_cast*>(alpha), reinterpret_cast*>(x), incx, reinterpret_cast*>(y), incy, reinterpret_cast*>(a), lda, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1039,7 +969,6 @@ extern "C" int onemklZgeru(syclQueue_t device_queue, int64_t m, int64_t n, doubl extern "C" int onemklChbmv(syclQueue_t device_queue, onemklUplo upper_lower, int64_t n, int64_t k, float _Complex *alpha, float _Complex *a, int64_t lda, float _Complex *x, int64_t incx, float _Complex *beta, float _Complex *y, int64_t incy) { try { auto status = oneapi::mkl::blas::column_major::hbmv(device_queue->val, convert(upper_lower), n, k, *reinterpret_cast*>(alpha), reinterpret_cast*>(a), lda, reinterpret_cast*>(x), incx, *reinterpret_cast*>(beta), reinterpret_cast*>(y), incy, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1047,7 +976,6 @@ extern "C" int onemklChbmv(syclQueue_t device_queue, onemklUplo upper_lower, int extern "C" int onemklZhbmv(syclQueue_t device_queue, onemklUplo upper_lower, int64_t n, int64_t k, double _Complex *alpha, double _Complex *a, int64_t lda, double _Complex *x, int64_t incx, double _Complex *beta, double _Complex *y, int64_t incy) { try { auto status = oneapi::mkl::blas::column_major::hbmv(device_queue->val, convert(upper_lower), n, k, *reinterpret_cast*>(alpha), reinterpret_cast*>(a), lda, reinterpret_cast*>(x), incx, *reinterpret_cast*>(beta), reinterpret_cast*>(y), incy, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1055,7 +983,6 @@ extern "C" int onemklZhbmv(syclQueue_t device_queue, onemklUplo upper_lower, int extern "C" int onemklChemv(syclQueue_t device_queue, onemklUplo upper_lower, int64_t n, float _Complex *alpha, float _Complex *a, int64_t lda, float _Complex *x, int64_t incx, float _Complex *beta, float _Complex *y, int64_t incy) { try { auto status = oneapi::mkl::blas::column_major::hemv(device_queue->val, convert(upper_lower), n, *reinterpret_cast*>(alpha), reinterpret_cast*>(a), lda, reinterpret_cast*>(x), incx, *reinterpret_cast*>(beta), reinterpret_cast*>(y), incy, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1063,7 +990,6 @@ extern "C" int onemklChemv(syclQueue_t device_queue, onemklUplo upper_lower, int extern "C" int onemklZhemv(syclQueue_t device_queue, onemklUplo upper_lower, int64_t n, double _Complex *alpha, double _Complex *a, int64_t lda, double _Complex *x, int64_t incx, double _Complex *beta, double _Complex *y, int64_t incy) { try { auto status = oneapi::mkl::blas::column_major::hemv(device_queue->val, convert(upper_lower), n, *reinterpret_cast*>(alpha), reinterpret_cast*>(a), lda, reinterpret_cast*>(x), incx, *reinterpret_cast*>(beta), reinterpret_cast*>(y), incy, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1071,7 +997,6 @@ extern "C" int onemklZhemv(syclQueue_t device_queue, onemklUplo upper_lower, int extern "C" int onemklCher(syclQueue_t device_queue, onemklUplo upper_lower, int64_t n, float *alpha, float _Complex *x, int64_t incx, float _Complex *a, int64_t lda) { try { auto status = oneapi::mkl::blas::column_major::her(device_queue->val, convert(upper_lower), n, *alpha, reinterpret_cast*>(x), incx, reinterpret_cast*>(a), lda, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1079,7 +1004,6 @@ extern "C" int onemklCher(syclQueue_t device_queue, onemklUplo upper_lower, int6 extern "C" int onemklZher(syclQueue_t device_queue, onemklUplo upper_lower, int64_t n, double *alpha, double _Complex *x, int64_t incx, double _Complex *a, int64_t lda) { try { auto status = oneapi::mkl::blas::column_major::her(device_queue->val, convert(upper_lower), n, *alpha, reinterpret_cast*>(x), incx, reinterpret_cast*>(a), lda, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1087,7 +1011,6 @@ extern "C" int onemklZher(syclQueue_t device_queue, onemklUplo upper_lower, int6 extern "C" int onemklCher2(syclQueue_t device_queue, onemklUplo upper_lower, int64_t n, float _Complex *alpha, float _Complex *x, int64_t incx, float _Complex *y, int64_t incy, float _Complex *a, int64_t lda) { try { auto status = oneapi::mkl::blas::column_major::her2(device_queue->val, convert(upper_lower), n, *reinterpret_cast*>(alpha), reinterpret_cast*>(x), incx, reinterpret_cast*>(y), incy, reinterpret_cast*>(a), lda, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1095,7 +1018,6 @@ extern "C" int onemklCher2(syclQueue_t device_queue, onemklUplo upper_lower, int extern "C" int onemklZher2(syclQueue_t device_queue, onemklUplo upper_lower, int64_t n, double _Complex *alpha, double _Complex *x, int64_t incx, double _Complex *y, int64_t incy, double _Complex *a, int64_t lda) { try { auto status = oneapi::mkl::blas::column_major::her2(device_queue->val, convert(upper_lower), n, *reinterpret_cast*>(alpha), reinterpret_cast*>(x), incx, reinterpret_cast*>(y), incy, reinterpret_cast*>(a), lda, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1103,7 +1025,6 @@ extern "C" int onemklZher2(syclQueue_t device_queue, onemklUplo upper_lower, int extern "C" int onemklChpmv(syclQueue_t device_queue, onemklUplo upper_lower, int64_t n, float _Complex *alpha, float _Complex *a, float _Complex *x, int64_t incx, float _Complex *beta, float _Complex *y, int64_t incy) { try { auto status = oneapi::mkl::blas::column_major::hpmv(device_queue->val, convert(upper_lower), n, *reinterpret_cast*>(alpha), reinterpret_cast*>(a), reinterpret_cast*>(x), incx, *reinterpret_cast*>(beta), reinterpret_cast*>(y), incy, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1111,7 +1032,6 @@ extern "C" int onemklChpmv(syclQueue_t device_queue, onemklUplo upper_lower, int extern "C" int onemklZhpmv(syclQueue_t device_queue, onemklUplo upper_lower, int64_t n, double _Complex *alpha, double _Complex *a, double _Complex *x, int64_t incx, double _Complex *beta, double _Complex *y, int64_t incy) { try { auto status = oneapi::mkl::blas::column_major::hpmv(device_queue->val, convert(upper_lower), n, *reinterpret_cast*>(alpha), reinterpret_cast*>(a), reinterpret_cast*>(x), incx, *reinterpret_cast*>(beta), reinterpret_cast*>(y), incy, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1119,7 +1039,6 @@ extern "C" int onemklZhpmv(syclQueue_t device_queue, onemklUplo upper_lower, int extern "C" int onemklChpr(syclQueue_t device_queue, onemklUplo upper_lower, int64_t n, float *alpha, float _Complex *x, int64_t incx, float _Complex *a) { try { auto status = oneapi::mkl::blas::column_major::hpr(device_queue->val, convert(upper_lower), n, *alpha, reinterpret_cast*>(x), incx, reinterpret_cast*>(a), {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1127,7 +1046,6 @@ extern "C" int onemklChpr(syclQueue_t device_queue, onemklUplo upper_lower, int6 extern "C" int onemklZhpr(syclQueue_t device_queue, onemklUplo upper_lower, int64_t n, double *alpha, double _Complex *x, int64_t incx, double _Complex *a) { try { auto status = oneapi::mkl::blas::column_major::hpr(device_queue->val, convert(upper_lower), n, *alpha, reinterpret_cast*>(x), incx, reinterpret_cast*>(a), {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1135,7 +1053,6 @@ extern "C" int onemklZhpr(syclQueue_t device_queue, onemklUplo upper_lower, int6 extern "C" int onemklChpr2(syclQueue_t device_queue, onemklUplo upper_lower, int64_t n, float _Complex *alpha, float _Complex *x, int64_t incx, float _Complex *y, int64_t incy, float _Complex *a) { try { auto status = oneapi::mkl::blas::column_major::hpr2(device_queue->val, convert(upper_lower), n, *reinterpret_cast*>(alpha), reinterpret_cast*>(x), incx, reinterpret_cast*>(y), incy, reinterpret_cast*>(a), {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1143,7 +1060,6 @@ extern "C" int onemklChpr2(syclQueue_t device_queue, onemklUplo upper_lower, int extern "C" int onemklZhpr2(syclQueue_t device_queue, onemklUplo upper_lower, int64_t n, double _Complex *alpha, double _Complex *x, int64_t incx, double _Complex *y, int64_t incy, double _Complex *a) { try { auto status = oneapi::mkl::blas::column_major::hpr2(device_queue->val, convert(upper_lower), n, *reinterpret_cast*>(alpha), reinterpret_cast*>(x), incx, reinterpret_cast*>(y), incy, reinterpret_cast*>(a), {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1151,7 +1067,6 @@ extern "C" int onemklZhpr2(syclQueue_t device_queue, onemklUplo upper_lower, int extern "C" int onemklSsbmv(syclQueue_t device_queue, onemklUplo upper_lower, int64_t n, int64_t k, float *alpha, float *a, int64_t lda, float *x, int64_t incx, float *beta, float *y, int64_t incy) { try { auto status = oneapi::mkl::blas::column_major::sbmv(device_queue->val, convert(upper_lower), n, k, *alpha, a, lda, x, incx, *beta, y, incy, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1159,7 +1074,6 @@ extern "C" int onemklSsbmv(syclQueue_t device_queue, onemklUplo upper_lower, int extern "C" int onemklDsbmv(syclQueue_t device_queue, onemklUplo upper_lower, int64_t n, int64_t k, double *alpha, double *a, int64_t lda, double *x, int64_t incx, double *beta, double *y, int64_t incy) { try { auto status = oneapi::mkl::blas::column_major::sbmv(device_queue->val, convert(upper_lower), n, k, *alpha, a, lda, x, incx, *beta, y, incy, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1167,7 +1081,6 @@ extern "C" int onemklDsbmv(syclQueue_t device_queue, onemklUplo upper_lower, int extern "C" int onemklSsymv(syclQueue_t device_queue, onemklUplo upper_lower, int64_t n, float *alpha, float *a, int64_t lda, float *x, int64_t incx, float *beta, float *y, int64_t incy) { try { auto status = oneapi::mkl::blas::column_major::symv(device_queue->val, convert(upper_lower), n, *alpha, a, lda, x, incx, *beta, y, incy, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1175,7 +1088,6 @@ extern "C" int onemklSsymv(syclQueue_t device_queue, onemklUplo upper_lower, int extern "C" int onemklDsymv(syclQueue_t device_queue, onemklUplo upper_lower, int64_t n, double *alpha, double *a, int64_t lda, double *x, int64_t incx, double *beta, double *y, int64_t incy) { try { auto status = oneapi::mkl::blas::column_major::symv(device_queue->val, convert(upper_lower), n, *alpha, a, lda, x, incx, *beta, y, incy, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1183,7 +1095,6 @@ extern "C" int onemklDsymv(syclQueue_t device_queue, onemklUplo upper_lower, int extern "C" int onemklCsymv(syclQueue_t device_queue, onemklUplo upper_lower, int64_t n, float _Complex *alpha, float _Complex *a, int64_t lda, float _Complex *x, int64_t incx, float _Complex *beta, float _Complex *y, int64_t incy) { try { auto status = oneapi::mkl::blas::column_major::symv(device_queue->val, convert(upper_lower), n, *reinterpret_cast*>(alpha), reinterpret_cast*>(a), lda, reinterpret_cast*>(x), incx, *reinterpret_cast*>(beta), reinterpret_cast*>(y), incy, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1191,7 +1102,6 @@ extern "C" int onemklCsymv(syclQueue_t device_queue, onemklUplo upper_lower, int extern "C" int onemklZsymv(syclQueue_t device_queue, onemklUplo upper_lower, int64_t n, double _Complex *alpha, double _Complex *a, int64_t lda, double _Complex *x, int64_t incx, double _Complex *beta, double _Complex *y, int64_t incy) { try { auto status = oneapi::mkl::blas::column_major::symv(device_queue->val, convert(upper_lower), n, *reinterpret_cast*>(alpha), reinterpret_cast*>(a), lda, reinterpret_cast*>(x), incx, *reinterpret_cast*>(beta), reinterpret_cast*>(y), incy, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1199,7 +1109,6 @@ extern "C" int onemklZsymv(syclQueue_t device_queue, onemklUplo upper_lower, int extern "C" int onemklSsyr(syclQueue_t device_queue, onemklUplo upper_lower, int64_t n, float *alpha, float *x, int64_t incx, float *a, int64_t lda) { try { auto status = oneapi::mkl::blas::column_major::syr(device_queue->val, convert(upper_lower), n, *alpha, x, incx, a, lda, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1207,7 +1116,6 @@ extern "C" int onemklSsyr(syclQueue_t device_queue, onemklUplo upper_lower, int6 extern "C" int onemklDsyr(syclQueue_t device_queue, onemklUplo upper_lower, int64_t n, double *alpha, double *x, int64_t incx, double *a, int64_t lda) { try { auto status = oneapi::mkl::blas::column_major::syr(device_queue->val, convert(upper_lower), n, *alpha, x, incx, a, lda, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1215,7 +1123,6 @@ extern "C" int onemklDsyr(syclQueue_t device_queue, onemklUplo upper_lower, int6 extern "C" int onemklCsyr(syclQueue_t device_queue, onemklUplo upper_lower, int64_t n, float _Complex *alpha, float _Complex *x, int64_t incx, float _Complex *a, int64_t lda) { try { auto status = oneapi::mkl::blas::column_major::syr(device_queue->val, convert(upper_lower), n, *reinterpret_cast*>(alpha), reinterpret_cast*>(x), incx, reinterpret_cast*>(a), lda, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1223,7 +1130,6 @@ extern "C" int onemklCsyr(syclQueue_t device_queue, onemklUplo upper_lower, int6 extern "C" int onemklZsyr(syclQueue_t device_queue, onemklUplo upper_lower, int64_t n, double _Complex *alpha, double _Complex *x, int64_t incx, double _Complex *a, int64_t lda) { try { auto status = oneapi::mkl::blas::column_major::syr(device_queue->val, convert(upper_lower), n, *reinterpret_cast*>(alpha), reinterpret_cast*>(x), incx, reinterpret_cast*>(a), lda, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1231,7 +1137,6 @@ extern "C" int onemklZsyr(syclQueue_t device_queue, onemklUplo upper_lower, int6 extern "C" int onemklSsyr2(syclQueue_t device_queue, onemklUplo upper_lower, int64_t n, float *alpha, float *x, int64_t incx, float *y, int64_t incy, float *a, int64_t lda) { try { auto status = oneapi::mkl::blas::column_major::syr2(device_queue->val, convert(upper_lower), n, *alpha, x, incx, y, incy, a, lda, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1239,7 +1144,6 @@ extern "C" int onemklSsyr2(syclQueue_t device_queue, onemklUplo upper_lower, int extern "C" int onemklDsyr2(syclQueue_t device_queue, onemklUplo upper_lower, int64_t n, double *alpha, double *x, int64_t incx, double *y, int64_t incy, double *a, int64_t lda) { try { auto status = oneapi::mkl::blas::column_major::syr2(device_queue->val, convert(upper_lower), n, *alpha, x, incx, y, incy, a, lda, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1247,7 +1151,6 @@ extern "C" int onemklDsyr2(syclQueue_t device_queue, onemklUplo upper_lower, int extern "C" int onemklCsyr2(syclQueue_t device_queue, onemklUplo upper_lower, int64_t n, float _Complex *alpha, float _Complex *x, int64_t incx, float _Complex *y, int64_t incy, float _Complex *a, int64_t lda) { try { auto status = oneapi::mkl::blas::column_major::syr2(device_queue->val, convert(upper_lower), n, *reinterpret_cast*>(alpha), reinterpret_cast*>(x), incx, reinterpret_cast*>(y), incy, reinterpret_cast*>(a), lda, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1255,7 +1158,6 @@ extern "C" int onemklCsyr2(syclQueue_t device_queue, onemklUplo upper_lower, int extern "C" int onemklZsyr2(syclQueue_t device_queue, onemklUplo upper_lower, int64_t n, double _Complex *alpha, double _Complex *x, int64_t incx, double _Complex *y, int64_t incy, double _Complex *a, int64_t lda) { try { auto status = oneapi::mkl::blas::column_major::syr2(device_queue->val, convert(upper_lower), n, *reinterpret_cast*>(alpha), reinterpret_cast*>(x), incx, reinterpret_cast*>(y), incy, reinterpret_cast*>(a), lda, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1263,7 +1165,6 @@ extern "C" int onemklZsyr2(syclQueue_t device_queue, onemklUplo upper_lower, int extern "C" int onemklSspmv(syclQueue_t device_queue, onemklUplo upper_lower, int64_t n, float *alpha, float *a, float *x, int64_t incx, float *beta, float *y, int64_t incy) { try { auto status = oneapi::mkl::blas::column_major::spmv(device_queue->val, convert(upper_lower), n, *alpha, a, x, incx, *beta, y, incy, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1271,7 +1172,6 @@ extern "C" int onemklSspmv(syclQueue_t device_queue, onemklUplo upper_lower, int extern "C" int onemklDspmv(syclQueue_t device_queue, onemklUplo upper_lower, int64_t n, double *alpha, double *a, double *x, int64_t incx, double *beta, double *y, int64_t incy) { try { auto status = oneapi::mkl::blas::column_major::spmv(device_queue->val, convert(upper_lower), n, *alpha, a, x, incx, *beta, y, incy, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1279,7 +1179,6 @@ extern "C" int onemklDspmv(syclQueue_t device_queue, onemklUplo upper_lower, int extern "C" int onemklSspr(syclQueue_t device_queue, onemklUplo upper_lower, int64_t n, float *alpha, float *x, int64_t incx, float *a) { try { auto status = oneapi::mkl::blas::column_major::spr(device_queue->val, convert(upper_lower), n, *alpha, x, incx, a, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1287,7 +1186,6 @@ extern "C" int onemklSspr(syclQueue_t device_queue, onemklUplo upper_lower, int6 extern "C" int onemklDspr(syclQueue_t device_queue, onemklUplo upper_lower, int64_t n, double *alpha, double *x, int64_t incx, double *a) { try { auto status = oneapi::mkl::blas::column_major::spr(device_queue->val, convert(upper_lower), n, *alpha, x, incx, a, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1295,7 +1193,6 @@ extern "C" int onemklDspr(syclQueue_t device_queue, onemklUplo upper_lower, int6 extern "C" int onemklSspr2(syclQueue_t device_queue, onemklUplo upper_lower, int64_t n, float *alpha, float *x, int64_t incx, float *y, int64_t incy, float *a) { try { auto status = oneapi::mkl::blas::column_major::spr2(device_queue->val, convert(upper_lower), n, *alpha, x, incx, y, incy, a, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1303,7 +1200,6 @@ extern "C" int onemklSspr2(syclQueue_t device_queue, onemklUplo upper_lower, int extern "C" int onemklDspr2(syclQueue_t device_queue, onemklUplo upper_lower, int64_t n, double *alpha, double *x, int64_t incx, double *y, int64_t incy, double *a) { try { auto status = oneapi::mkl::blas::column_major::spr2(device_queue->val, convert(upper_lower), n, *alpha, x, incx, y, incy, a, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1311,7 +1207,6 @@ extern "C" int onemklDspr2(syclQueue_t device_queue, onemklUplo upper_lower, int extern "C" int onemklStbmv(syclQueue_t device_queue, onemklUplo upper_lower, onemklTranspose trans, onemklDiag unit_diag, int64_t n, int64_t k, float *a, int64_t lda, float *x, int64_t incx) { try { auto status = oneapi::mkl::blas::column_major::tbmv(device_queue->val, convert(upper_lower), convert(trans), convert(unit_diag), n, k, a, lda, x, incx, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1319,7 +1214,6 @@ extern "C" int onemklStbmv(syclQueue_t device_queue, onemklUplo upper_lower, one extern "C" int onemklDtbmv(syclQueue_t device_queue, onemklUplo upper_lower, onemklTranspose trans, onemklDiag unit_diag, int64_t n, int64_t k, double *a, int64_t lda, double *x, int64_t incx) { try { auto status = oneapi::mkl::blas::column_major::tbmv(device_queue->val, convert(upper_lower), convert(trans), convert(unit_diag), n, k, a, lda, x, incx, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1327,7 +1221,6 @@ extern "C" int onemklDtbmv(syclQueue_t device_queue, onemklUplo upper_lower, one extern "C" int onemklCtbmv(syclQueue_t device_queue, onemklUplo upper_lower, onemklTranspose trans, onemklDiag unit_diag, int64_t n, int64_t k, float _Complex *a, int64_t lda, float _Complex *x, int64_t incx) { try { auto status = oneapi::mkl::blas::column_major::tbmv(device_queue->val, convert(upper_lower), convert(trans), convert(unit_diag), n, k, reinterpret_cast*>(a), lda, reinterpret_cast*>(x), incx, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1335,7 +1228,6 @@ extern "C" int onemklCtbmv(syclQueue_t device_queue, onemklUplo upper_lower, one extern "C" int onemklZtbmv(syclQueue_t device_queue, onemklUplo upper_lower, onemklTranspose trans, onemklDiag unit_diag, int64_t n, int64_t k, double _Complex *a, int64_t lda, double _Complex *x, int64_t incx) { try { auto status = oneapi::mkl::blas::column_major::tbmv(device_queue->val, convert(upper_lower), convert(trans), convert(unit_diag), n, k, reinterpret_cast*>(a), lda, reinterpret_cast*>(x), incx, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1439,7 +1331,6 @@ extern "C" int onemklZtpsv(syclQueue_t device_queue, onemklUplo upper_lower, one extern "C" int onemklStrmv(syclQueue_t device_queue, onemklUplo upper_lower, onemklTranspose trans, onemklDiag unit_diag, int64_t n, float *a, int64_t lda, float *x, int64_t incx) { try { auto status = oneapi::mkl::blas::column_major::trmv(device_queue->val, convert(upper_lower), convert(trans), convert(unit_diag), n, a, lda, x, incx, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1447,7 +1338,6 @@ extern "C" int onemklStrmv(syclQueue_t device_queue, onemklUplo upper_lower, one extern "C" int onemklDtrmv(syclQueue_t device_queue, onemklUplo upper_lower, onemklTranspose trans, onemklDiag unit_diag, int64_t n, double *a, int64_t lda, double *x, int64_t incx) { try { auto status = oneapi::mkl::blas::column_major::trmv(device_queue->val, convert(upper_lower), convert(trans), convert(unit_diag), n, a, lda, x, incx, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1455,7 +1345,6 @@ extern "C" int onemklDtrmv(syclQueue_t device_queue, onemklUplo upper_lower, one extern "C" int onemklCtrmv(syclQueue_t device_queue, onemklUplo upper_lower, onemklTranspose trans, onemklDiag unit_diag, int64_t n, float _Complex *a, int64_t lda, float _Complex *x, int64_t incx) { try { auto status = oneapi::mkl::blas::column_major::trmv(device_queue->val, convert(upper_lower), convert(trans), convert(unit_diag), n, reinterpret_cast*>(a), lda, reinterpret_cast*>(x), incx, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1463,7 +1352,6 @@ extern "C" int onemklCtrmv(syclQueue_t device_queue, onemklUplo upper_lower, one extern "C" int onemklZtrmv(syclQueue_t device_queue, onemklUplo upper_lower, onemklTranspose trans, onemklDiag unit_diag, int64_t n, double _Complex *a, int64_t lda, double _Complex *x, int64_t incx) { try { auto status = oneapi::mkl::blas::column_major::trmv(device_queue->val, convert(upper_lower), convert(trans), convert(unit_diag), n, reinterpret_cast*>(a), lda, reinterpret_cast*>(x), incx, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1471,7 +1359,6 @@ extern "C" int onemklZtrmv(syclQueue_t device_queue, onemklUplo upper_lower, one extern "C" int onemklStrsv(syclQueue_t device_queue, onemklUplo upper_lower, onemklTranspose trans, onemklDiag unit_diag, int64_t n, float *a, int64_t lda, float *x, int64_t incx) { try { auto status = oneapi::mkl::blas::column_major::trsv(device_queue->val, convert(upper_lower), convert(trans), convert(unit_diag), n, a, lda, x, incx, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1479,7 +1366,6 @@ extern "C" int onemklStrsv(syclQueue_t device_queue, onemklUplo upper_lower, one extern "C" int onemklDtrsv(syclQueue_t device_queue, onemklUplo upper_lower, onemklTranspose trans, onemklDiag unit_diag, int64_t n, double *a, int64_t lda, double *x, int64_t incx) { try { auto status = oneapi::mkl::blas::column_major::trsv(device_queue->val, convert(upper_lower), convert(trans), convert(unit_diag), n, a, lda, x, incx, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1487,7 +1373,6 @@ extern "C" int onemklDtrsv(syclQueue_t device_queue, onemklUplo upper_lower, one extern "C" int onemklCtrsv(syclQueue_t device_queue, onemklUplo upper_lower, onemklTranspose trans, onemklDiag unit_diag, int64_t n, float _Complex *a, int64_t lda, float _Complex *x, int64_t incx) { try { auto status = oneapi::mkl::blas::column_major::trsv(device_queue->val, convert(upper_lower), convert(trans), convert(unit_diag), n, reinterpret_cast*>(a), lda, reinterpret_cast*>(x), incx, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1495,7 +1380,6 @@ extern "C" int onemklCtrsv(syclQueue_t device_queue, onemklUplo upper_lower, one extern "C" int onemklZtrsv(syclQueue_t device_queue, onemklUplo upper_lower, onemklTranspose trans, onemklDiag unit_diag, int64_t n, double _Complex *a, int64_t lda, double _Complex *x, int64_t incx) { try { auto status = oneapi::mkl::blas::column_major::trsv(device_queue->val, convert(upper_lower), convert(trans), convert(unit_diag), n, reinterpret_cast*>(a), lda, reinterpret_cast*>(x), incx, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1535,7 +1419,6 @@ extern "C" int onemklZdotu(syclQueue_t device_queue, int64_t n, double _Complex extern "C" int onemklSiamax(syclQueue_t device_queue, int64_t n, float *x, int64_t incx, int32_t *result, onemklIndex base) { try { auto status = oneapi::mkl::blas::column_major::iamax(device_queue->val, n, x, incx, result, convert(base), {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1543,7 +1426,6 @@ extern "C" int onemklSiamax(syclQueue_t device_queue, int64_t n, float *x, int64 extern "C" int onemklSiamax_64(syclQueue_t device_queue, int64_t n, float *x, int64_t incx, int64_t *result, onemklIndex base) { try { auto status = oneapi::mkl::blas::column_major::iamax(device_queue->val, n, x, incx, result, convert(base), {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1551,7 +1433,6 @@ extern "C" int onemklSiamax_64(syclQueue_t device_queue, int64_t n, float *x, in extern "C" int onemklDiamax(syclQueue_t device_queue, int64_t n, double *x, int64_t incx, int32_t *result, onemklIndex base) { try { auto status = oneapi::mkl::blas::column_major::iamax(device_queue->val, n, x, incx, result, convert(base), {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1559,7 +1440,6 @@ extern "C" int onemklDiamax(syclQueue_t device_queue, int64_t n, double *x, int6 extern "C" int onemklDiamax_64(syclQueue_t device_queue, int64_t n, double *x, int64_t incx, int64_t *result, onemklIndex base) { try { auto status = oneapi::mkl::blas::column_major::iamax(device_queue->val, n, x, incx, result, convert(base), {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1567,7 +1447,6 @@ extern "C" int onemklDiamax_64(syclQueue_t device_queue, int64_t n, double *x, i extern "C" int onemklCiamax(syclQueue_t device_queue, int64_t n, float _Complex *x, int64_t incx, int32_t *result, onemklIndex base) { try { auto status = oneapi::mkl::blas::column_major::iamax(device_queue->val, n, reinterpret_cast*>(x), incx, result, convert(base), {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1575,7 +1454,6 @@ extern "C" int onemklCiamax(syclQueue_t device_queue, int64_t n, float _Complex extern "C" int onemklCiamax_64(syclQueue_t device_queue, int64_t n, float _Complex *x, int64_t incx, int64_t *result, onemklIndex base) { try { auto status = oneapi::mkl::blas::column_major::iamax(device_queue->val, n, reinterpret_cast*>(x), incx, result, convert(base), {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1583,7 +1461,6 @@ extern "C" int onemklCiamax_64(syclQueue_t device_queue, int64_t n, float _Compl extern "C" int onemklZiamax(syclQueue_t device_queue, int64_t n, double _Complex *x, int64_t incx, int32_t *result, onemklIndex base) { try { auto status = oneapi::mkl::blas::column_major::iamax(device_queue->val, n, reinterpret_cast*>(x), incx, result, convert(base), {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1591,7 +1468,6 @@ extern "C" int onemklZiamax(syclQueue_t device_queue, int64_t n, double _Complex extern "C" int onemklZiamax_64(syclQueue_t device_queue, int64_t n, double _Complex *x, int64_t incx, int64_t *result, onemklIndex base) { try { auto status = oneapi::mkl::blas::column_major::iamax(device_queue->val, n, reinterpret_cast*>(x), incx, result, convert(base), {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1599,7 +1475,6 @@ extern "C" int onemklZiamax_64(syclQueue_t device_queue, int64_t n, double _Comp extern "C" int onemklSiamin(syclQueue_t device_queue, int64_t n, float *x, int64_t incx, int32_t *result, onemklIndex base) { try { auto status = oneapi::mkl::blas::column_major::iamin(device_queue->val, n, x, incx, result, convert(base), {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1607,7 +1482,6 @@ extern "C" int onemklSiamin(syclQueue_t device_queue, int64_t n, float *x, int64 extern "C" int onemklSiamin_64(syclQueue_t device_queue, int64_t n, float *x, int64_t incx, int64_t *result, onemklIndex base) { try { auto status = oneapi::mkl::blas::column_major::iamin(device_queue->val, n, x, incx, result, convert(base), {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1615,7 +1489,6 @@ extern "C" int onemklSiamin_64(syclQueue_t device_queue, int64_t n, float *x, in extern "C" int onemklDiamin(syclQueue_t device_queue, int64_t n, double *x, int64_t incx, int32_t *result, onemklIndex base) { try { auto status = oneapi::mkl::blas::column_major::iamin(device_queue->val, n, x, incx, result, convert(base), {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1623,7 +1496,6 @@ extern "C" int onemklDiamin(syclQueue_t device_queue, int64_t n, double *x, int6 extern "C" int onemklDiamin_64(syclQueue_t device_queue, int64_t n, double *x, int64_t incx, int64_t *result, onemklIndex base) { try { auto status = oneapi::mkl::blas::column_major::iamin(device_queue->val, n, x, incx, result, convert(base), {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1631,7 +1503,6 @@ extern "C" int onemklDiamin_64(syclQueue_t device_queue, int64_t n, double *x, i extern "C" int onemklCiamin(syclQueue_t device_queue, int64_t n, float _Complex *x, int64_t incx, int32_t *result, onemklIndex base) { try { auto status = oneapi::mkl::blas::column_major::iamin(device_queue->val, n, reinterpret_cast*>(x), incx, result, convert(base), {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1639,7 +1510,6 @@ extern "C" int onemklCiamin(syclQueue_t device_queue, int64_t n, float _Complex extern "C" int onemklCiamin_64(syclQueue_t device_queue, int64_t n, float _Complex *x, int64_t incx, int64_t *result, onemklIndex base) { try { auto status = oneapi::mkl::blas::column_major::iamin(device_queue->val, n, reinterpret_cast*>(x), incx, result, convert(base), {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1647,7 +1517,6 @@ extern "C" int onemklCiamin_64(syclQueue_t device_queue, int64_t n, float _Compl extern "C" int onemklZiamin(syclQueue_t device_queue, int64_t n, double _Complex *x, int64_t incx, int32_t *result, onemklIndex base) { try { auto status = oneapi::mkl::blas::column_major::iamin(device_queue->val, n, reinterpret_cast*>(x), incx, result, convert(base), {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1655,7 +1524,6 @@ extern "C" int onemklZiamin(syclQueue_t device_queue, int64_t n, double _Complex extern "C" int onemklZiamin_64(syclQueue_t device_queue, int64_t n, double _Complex *x, int64_t incx, int64_t *result, onemklIndex base) { try { auto status = oneapi::mkl::blas::column_major::iamin(device_queue->val, n, reinterpret_cast*>(x), incx, result, convert(base), {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1663,7 +1531,6 @@ extern "C" int onemklZiamin_64(syclQueue_t device_queue, int64_t n, double _Comp extern "C" int onemklSasum(syclQueue_t device_queue, int64_t n, float *x, int64_t incx, float *result) { try { auto status = oneapi::mkl::blas::column_major::asum(device_queue->val, n, x, incx, result, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1671,7 +1538,6 @@ extern "C" int onemklSasum(syclQueue_t device_queue, int64_t n, float *x, int64_ extern "C" int onemklDasum(syclQueue_t device_queue, int64_t n, double *x, int64_t incx, double *result) { try { auto status = oneapi::mkl::blas::column_major::asum(device_queue->val, n, x, incx, result, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1679,7 +1545,6 @@ extern "C" int onemklDasum(syclQueue_t device_queue, int64_t n, double *x, int64 extern "C" int onemklCasum(syclQueue_t device_queue, int64_t n, float _Complex *x, int64_t incx, float *result) { try { auto status = oneapi::mkl::blas::column_major::asum(device_queue->val, n, reinterpret_cast*>(x), incx, result, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1687,7 +1552,6 @@ extern "C" int onemklCasum(syclQueue_t device_queue, int64_t n, float _Complex * extern "C" int onemklZasum(syclQueue_t device_queue, int64_t n, double _Complex *x, int64_t incx, double *result) { try { auto status = oneapi::mkl::blas::column_major::asum(device_queue->val, n, reinterpret_cast*>(x), incx, result, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1695,7 +1559,6 @@ extern "C" int onemklZasum(syclQueue_t device_queue, int64_t n, double _Complex extern "C" int onemklHaxpy(syclQueue_t device_queue, int64_t n, short *alpha, short *x, int64_t incx, short *y, int64_t incy) { try { auto status = oneapi::mkl::blas::column_major::axpy(device_queue->val, n, *reinterpret_cast(alpha), reinterpret_cast(x), incx, reinterpret_cast(y), incy, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1703,7 +1566,6 @@ extern "C" int onemklHaxpy(syclQueue_t device_queue, int64_t n, short *alpha, sh extern "C" int onemklSaxpy(syclQueue_t device_queue, int64_t n, float *alpha, float *x, int64_t incx, float *y, int64_t incy) { try { auto status = oneapi::mkl::blas::column_major::axpy(device_queue->val, n, *alpha, x, incx, y, incy, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1711,7 +1573,6 @@ extern "C" int onemklSaxpy(syclQueue_t device_queue, int64_t n, float *alpha, fl extern "C" int onemklDaxpy(syclQueue_t device_queue, int64_t n, double *alpha, double *x, int64_t incx, double *y, int64_t incy) { try { auto status = oneapi::mkl::blas::column_major::axpy(device_queue->val, n, *alpha, x, incx, y, incy, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1719,7 +1580,6 @@ extern "C" int onemklDaxpy(syclQueue_t device_queue, int64_t n, double *alpha, d extern "C" int onemklCaxpy(syclQueue_t device_queue, int64_t n, float _Complex *alpha, float _Complex *x, int64_t incx, float _Complex *y, int64_t incy) { try { auto status = oneapi::mkl::blas::column_major::axpy(device_queue->val, n, *reinterpret_cast*>(alpha), reinterpret_cast*>(x), incx, reinterpret_cast*>(y), incy, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1727,7 +1587,6 @@ extern "C" int onemklCaxpy(syclQueue_t device_queue, int64_t n, float _Complex * extern "C" int onemklZaxpy(syclQueue_t device_queue, int64_t n, double _Complex *alpha, double _Complex *x, int64_t incx, double _Complex *y, int64_t incy) { try { auto status = oneapi::mkl::blas::column_major::axpy(device_queue->val, n, *reinterpret_cast*>(alpha), reinterpret_cast*>(x), incx, reinterpret_cast*>(y), incy, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1735,7 +1594,6 @@ extern "C" int onemklZaxpy(syclQueue_t device_queue, int64_t n, double _Complex extern "C" int onemklSaxpby(syclQueue_t device_queue, int64_t n, float *alpha, float *x, int64_t incx, float *beta, float *y, int64_t incy) { try { auto status = oneapi::mkl::blas::column_major::axpby(device_queue->val, n, *alpha, x, incx, *beta, y, incy, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1743,7 +1601,6 @@ extern "C" int onemklSaxpby(syclQueue_t device_queue, int64_t n, float *alpha, f extern "C" int onemklDaxpby(syclQueue_t device_queue, int64_t n, double *alpha, double *x, int64_t incx, double *beta, double *y, int64_t incy) { try { auto status = oneapi::mkl::blas::column_major::axpby(device_queue->val, n, *alpha, x, incx, *beta, y, incy, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1751,7 +1608,6 @@ extern "C" int onemklDaxpby(syclQueue_t device_queue, int64_t n, double *alpha, extern "C" int onemklCaxpby(syclQueue_t device_queue, int64_t n, float _Complex *alpha, float _Complex *x, int64_t incx, float _Complex *beta, float _Complex *y, int64_t incy) { try { auto status = oneapi::mkl::blas::column_major::axpby(device_queue->val, n, *reinterpret_cast*>(alpha), reinterpret_cast*>(x), incx, *reinterpret_cast*>(beta), reinterpret_cast*>(y), incy, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1759,7 +1615,6 @@ extern "C" int onemklCaxpby(syclQueue_t device_queue, int64_t n, float _Complex extern "C" int onemklZaxpby(syclQueue_t device_queue, int64_t n, double _Complex *alpha, double _Complex *x, int64_t incx, double _Complex *beta, double _Complex *y, int64_t incy) { try { auto status = oneapi::mkl::blas::column_major::axpby(device_queue->val, n, *reinterpret_cast*>(alpha), reinterpret_cast*>(x), incx, *reinterpret_cast*>(beta), reinterpret_cast*>(y), incy, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1767,7 +1622,6 @@ extern "C" int onemklZaxpby(syclQueue_t device_queue, int64_t n, double _Complex extern "C" int onemklScopy(syclQueue_t device_queue, int64_t n, float *x, int64_t incx, float *y, int64_t incy) { try { auto status = oneapi::mkl::blas::column_major::copy(device_queue->val, n, x, incx, y, incy, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1775,7 +1629,6 @@ extern "C" int onemklScopy(syclQueue_t device_queue, int64_t n, float *x, int64_ extern "C" int onemklDcopy(syclQueue_t device_queue, int64_t n, double *x, int64_t incx, double *y, int64_t incy) { try { auto status = oneapi::mkl::blas::column_major::copy(device_queue->val, n, x, incx, y, incy, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1783,7 +1636,6 @@ extern "C" int onemklDcopy(syclQueue_t device_queue, int64_t n, double *x, int64 extern "C" int onemklCcopy(syclQueue_t device_queue, int64_t n, float _Complex *x, int64_t incx, float _Complex *y, int64_t incy) { try { auto status = oneapi::mkl::blas::column_major::copy(device_queue->val, n, reinterpret_cast*>(x), incx, reinterpret_cast*>(y), incy, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1791,7 +1643,6 @@ extern "C" int onemklCcopy(syclQueue_t device_queue, int64_t n, float _Complex * extern "C" int onemklZcopy(syclQueue_t device_queue, int64_t n, double _Complex *x, int64_t incx, double _Complex *y, int64_t incy) { try { auto status = oneapi::mkl::blas::column_major::copy(device_queue->val, n, reinterpret_cast*>(x), incx, reinterpret_cast*>(y), incy, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1871,7 +1722,6 @@ extern "C" int onemklZnrm2(syclQueue_t device_queue, int64_t n, double _Complex extern "C" int onemklHrot(syclQueue_t device_queue, int64_t n, short *x, int64_t incx, short *y, int64_t incy, short *c, short *s) { try { auto status = oneapi::mkl::blas::column_major::rot(device_queue->val, n, reinterpret_cast(x), incx, reinterpret_cast(y), incy, *reinterpret_cast(c), *reinterpret_cast(s), {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1879,7 +1729,6 @@ extern "C" int onemklHrot(syclQueue_t device_queue, int64_t n, short *x, int64_t extern "C" int onemklSrot(syclQueue_t device_queue, int64_t n, float *x, int64_t incx, float *y, int64_t incy, float *c, float *s) { try { auto status = oneapi::mkl::blas::column_major::rot(device_queue->val, n, x, incx, y, incy, *c, *s, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1887,7 +1736,6 @@ extern "C" int onemklSrot(syclQueue_t device_queue, int64_t n, float *x, int64_t extern "C" int onemklDrot(syclQueue_t device_queue, int64_t n, double *x, int64_t incx, double *y, int64_t incy, double *c, double *s) { try { auto status = oneapi::mkl::blas::column_major::rot(device_queue->val, n, x, incx, y, incy, *c, *s, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1895,7 +1743,6 @@ extern "C" int onemklDrot(syclQueue_t device_queue, int64_t n, double *x, int64_ extern "C" int onemklCSrot(syclQueue_t device_queue, int64_t n, float _Complex *x, int64_t incx, float _Complex *y, int64_t incy, float *c, float *s) { try { auto status = oneapi::mkl::blas::column_major::rot(device_queue->val, n, reinterpret_cast*>(x), incx, reinterpret_cast*>(y), incy, *c, *s, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1903,7 +1750,6 @@ extern "C" int onemklCSrot(syclQueue_t device_queue, int64_t n, float _Complex * extern "C" int onemklCrot(syclQueue_t device_queue, int64_t n, float _Complex *x, int64_t incx, float _Complex *y, int64_t incy, float *c, float _Complex *s) { try { auto status = oneapi::mkl::blas::column_major::rot(device_queue->val, n, reinterpret_cast*>(x), incx, reinterpret_cast*>(y), incy, *c, *reinterpret_cast*>(s), {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1911,7 +1757,6 @@ extern "C" int onemklCrot(syclQueue_t device_queue, int64_t n, float _Complex *x extern "C" int onemklZDrot(syclQueue_t device_queue, int64_t n, double _Complex *x, int64_t incx, double _Complex *y, int64_t incy, double *c, double *s) { try { auto status = oneapi::mkl::blas::column_major::rot(device_queue->val, n, reinterpret_cast*>(x), incx, reinterpret_cast*>(y), incy, *c, *s, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1919,7 +1764,6 @@ extern "C" int onemklZDrot(syclQueue_t device_queue, int64_t n, double _Complex extern "C" int onemklZrot(syclQueue_t device_queue, int64_t n, double _Complex *x, int64_t incx, double _Complex *y, int64_t incy, double *c, double _Complex *s) { try { auto status = oneapi::mkl::blas::column_major::rot(device_queue->val, n, reinterpret_cast*>(x), incx, reinterpret_cast*>(y), incy, *c, *reinterpret_cast*>(s), {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1991,7 +1835,6 @@ extern "C" int onemklDrotmg(syclQueue_t device_queue, double *d1, double *d2, do extern "C" int onemklHscal(syclQueue_t device_queue, int64_t n, short *alpha, short *x, int64_t incx) { try { auto status = oneapi::mkl::blas::column_major::scal(device_queue->val, n, *reinterpret_cast(alpha), reinterpret_cast(x), incx, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -1999,7 +1842,6 @@ extern "C" int onemklHscal(syclQueue_t device_queue, int64_t n, short *alpha, sh extern "C" int onemklSscal(syclQueue_t device_queue, int64_t n, float *alpha, float *x, int64_t incx) { try { auto status = oneapi::mkl::blas::column_major::scal(device_queue->val, n, *alpha, x, incx, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -2007,7 +1849,6 @@ extern "C" int onemklSscal(syclQueue_t device_queue, int64_t n, float *alpha, fl extern "C" int onemklDscal(syclQueue_t device_queue, int64_t n, double *alpha, double *x, int64_t incx) { try { auto status = oneapi::mkl::blas::column_major::scal(device_queue->val, n, *alpha, x, incx, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -2015,7 +1856,6 @@ extern "C" int onemklDscal(syclQueue_t device_queue, int64_t n, double *alpha, d extern "C" int onemklCSscal(syclQueue_t device_queue, int64_t n, float *alpha, float _Complex *x, int64_t incx) { try { auto status = oneapi::mkl::blas::column_major::scal(device_queue->val, n, *alpha, reinterpret_cast*>(x), incx, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -2023,7 +1863,6 @@ extern "C" int onemklCSscal(syclQueue_t device_queue, int64_t n, float *alpha, f extern "C" int onemklZDscal(syclQueue_t device_queue, int64_t n, double *alpha, double _Complex *x, int64_t incx) { try { auto status = oneapi::mkl::blas::column_major::scal(device_queue->val, n, *alpha, reinterpret_cast*>(x), incx, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -2031,7 +1870,6 @@ extern "C" int onemklZDscal(syclQueue_t device_queue, int64_t n, double *alpha, extern "C" int onemklCscal(syclQueue_t device_queue, int64_t n, float _Complex *alpha, float _Complex *x, int64_t incx) { try { auto status = oneapi::mkl::blas::column_major::scal(device_queue->val, n, *reinterpret_cast*>(alpha), reinterpret_cast*>(x), incx, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -2039,7 +1877,6 @@ extern "C" int onemklCscal(syclQueue_t device_queue, int64_t n, float _Complex * extern "C" int onemklZscal(syclQueue_t device_queue, int64_t n, double _Complex *alpha, double _Complex *x, int64_t incx) { try { auto status = oneapi::mkl::blas::column_major::scal(device_queue->val, n, *reinterpret_cast*>(alpha), reinterpret_cast*>(x), incx, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -2047,7 +1884,6 @@ extern "C" int onemklZscal(syclQueue_t device_queue, int64_t n, double _Complex extern "C" int onemklSswap(syclQueue_t device_queue, int64_t n, float *x, int64_t incx, float *y, int64_t incy) { try { auto status = oneapi::mkl::blas::column_major::swap(device_queue->val, n, x, incx, y, incy, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -2055,7 +1891,6 @@ extern "C" int onemklSswap(syclQueue_t device_queue, int64_t n, float *x, int64_ extern "C" int onemklDswap(syclQueue_t device_queue, int64_t n, double *x, int64_t incx, double *y, int64_t incy) { try { auto status = oneapi::mkl::blas::column_major::swap(device_queue->val, n, x, incx, y, incy, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -2063,7 +1898,6 @@ extern "C" int onemklDswap(syclQueue_t device_queue, int64_t n, double *x, int64 extern "C" int onemklCswap(syclQueue_t device_queue, int64_t n, float _Complex *x, int64_t incx, float _Complex *y, int64_t incy) { try { auto status = oneapi::mkl::blas::column_major::swap(device_queue->val, n, reinterpret_cast*>(x), incx, reinterpret_cast*>(y), incy, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -2071,7 +1905,6 @@ extern "C" int onemklCswap(syclQueue_t device_queue, int64_t n, float _Complex * extern "C" int onemklZswap(syclQueue_t device_queue, int64_t n, double _Complex *x, int64_t incx, double _Complex *y, int64_t incy) { try { auto status = oneapi::mkl::blas::column_major::swap(device_queue->val, n, reinterpret_cast*>(x), incx, reinterpret_cast*>(y), incy, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -2079,7 +1912,6 @@ extern "C" int onemklZswap(syclQueue_t device_queue, int64_t n, double _Complex extern "C" int onemklHgemm_batch_strided(syclQueue_t device_queue, onemklTranspose transa, onemklTranspose transb, int64_t m, int64_t n, int64_t k, short *alpha, short *a, int64_t lda, int64_t stride_a, short *b, int64_t ldb, int64_t stride_b, short *beta, short *c, int64_t ldc, int64_t stride_c, int64_t batch_size) { try { auto status = oneapi::mkl::blas::column_major::gemm_batch(device_queue->val, convert(transa), convert(transb), m, n, k, *reinterpret_cast(alpha), reinterpret_cast(a), lda, stride_a, reinterpret_cast(b), ldb, stride_b, *reinterpret_cast(beta), reinterpret_cast(c), ldc, stride_c, batch_size, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -2087,7 +1919,6 @@ extern "C" int onemklHgemm_batch_strided(syclQueue_t device_queue, onemklTranspo extern "C" int onemklSgemm_batch_strided(syclQueue_t device_queue, onemklTranspose transa, onemklTranspose transb, int64_t m, int64_t n, int64_t k, float *alpha, float *a, int64_t lda, int64_t stride_a, float *b, int64_t ldb, int64_t stride_b, float *beta, float *c, int64_t ldc, int64_t stride_c, int64_t batch_size) { try { auto status = oneapi::mkl::blas::column_major::gemm_batch(device_queue->val, convert(transa), convert(transb), m, n, k, *alpha, a, lda, stride_a, b, ldb, stride_b, *beta, c, ldc, stride_c, batch_size, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -2095,7 +1926,6 @@ extern "C" int onemklSgemm_batch_strided(syclQueue_t device_queue, onemklTranspo extern "C" int onemklDgemm_batch_strided(syclQueue_t device_queue, onemklTranspose transa, onemklTranspose transb, int64_t m, int64_t n, int64_t k, double *alpha, double *a, int64_t lda, int64_t stride_a, double *b, int64_t ldb, int64_t stride_b, double *beta, double *c, int64_t ldc, int64_t stride_c, int64_t batch_size) { try { auto status = oneapi::mkl::blas::column_major::gemm_batch(device_queue->val, convert(transa), convert(transb), m, n, k, *alpha, a, lda, stride_a, b, ldb, stride_b, *beta, c, ldc, stride_c, batch_size, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -2103,7 +1933,6 @@ extern "C" int onemklDgemm_batch_strided(syclQueue_t device_queue, onemklTranspo extern "C" int onemklCgemm_batch_strided(syclQueue_t device_queue, onemklTranspose transa, onemklTranspose transb, int64_t m, int64_t n, int64_t k, float _Complex *alpha, float _Complex *a, int64_t lda, int64_t stride_a, float _Complex *b, int64_t ldb, int64_t stride_b, float _Complex *beta, float _Complex *c, int64_t ldc, int64_t stride_c, int64_t batch_size) { try { auto status = oneapi::mkl::blas::column_major::gemm_batch(device_queue->val, convert(transa), convert(transb), m, n, k, *reinterpret_cast*>(alpha), reinterpret_cast*>(a), lda, stride_a, reinterpret_cast*>(b), ldb, stride_b, *reinterpret_cast*>(beta), reinterpret_cast*>(c), ldc, stride_c, batch_size, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -2111,7 +1940,6 @@ extern "C" int onemklCgemm_batch_strided(syclQueue_t device_queue, onemklTranspo extern "C" int onemklZgemm_batch_strided(syclQueue_t device_queue, onemklTranspose transa, onemklTranspose transb, int64_t m, int64_t n, int64_t k, double _Complex *alpha, double _Complex *a, int64_t lda, int64_t stride_a, double _Complex *b, int64_t ldb, int64_t stride_b, double _Complex *beta, double _Complex *c, int64_t ldc, int64_t stride_c, int64_t batch_size) { try { auto status = oneapi::mkl::blas::column_major::gemm_batch(device_queue->val, convert(transa), convert(transb), m, n, k, *reinterpret_cast*>(alpha), reinterpret_cast*>(a), lda, stride_a, reinterpret_cast*>(b), ldb, stride_b, *reinterpret_cast*>(beta), reinterpret_cast*>(c), ldc, stride_c, batch_size, {}); - device_queue->val.wait_and_throw(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -2568,7 +2396,6 @@ extern "C" int onemklZpotrf(syclQueue_t device_queue, onemklUplo uplo, int64_t n extern "C" int onemklSpotrs(syclQueue_t device_queue, onemklUplo uplo, int64_t n, int64_t nrhs, float *a, int64_t lda, float *b, int64_t ldb, float *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::potrs(device_queue->val, convert(uplo), n, nrhs, a, lda, b, ldb, scratchpad, scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -2576,7 +2403,6 @@ extern "C" int onemklSpotrs(syclQueue_t device_queue, onemklUplo uplo, int64_t n extern "C" int onemklDpotrs(syclQueue_t device_queue, onemklUplo uplo, int64_t n, int64_t nrhs, double *a, int64_t lda, double *b, int64_t ldb, double *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::potrs(device_queue->val, convert(uplo), n, nrhs, a, lda, b, ldb, scratchpad, scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -2584,7 +2410,6 @@ extern "C" int onemklDpotrs(syclQueue_t device_queue, onemklUplo uplo, int64_t n extern "C" int onemklCpotrs(syclQueue_t device_queue, onemklUplo uplo, int64_t n, int64_t nrhs, float _Complex *a, int64_t lda, float _Complex *b, int64_t ldb, float _Complex *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::potrs(device_queue->val, convert(uplo), n, nrhs, reinterpret_cast*>(a), lda, reinterpret_cast*>(b), ldb, reinterpret_cast*>(scratchpad), scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -2592,7 +2417,6 @@ extern "C" int onemklCpotrs(syclQueue_t device_queue, onemklUplo uplo, int64_t n extern "C" int onemklZpotrs(syclQueue_t device_queue, onemklUplo uplo, int64_t n, int64_t nrhs, double _Complex *a, int64_t lda, double _Complex *b, int64_t ldb, double _Complex *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::potrs(device_queue->val, convert(uplo), n, nrhs, reinterpret_cast*>(a), lda, reinterpret_cast*>(b), ldb, reinterpret_cast*>(scratchpad), scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -2600,7 +2424,6 @@ extern "C" int onemklZpotrs(syclQueue_t device_queue, onemklUplo uplo, int64_t n extern "C" int onemklSpotri(syclQueue_t device_queue, onemklUplo uplo, int64_t n, float *a, int64_t lda, float *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::potri(device_queue->val, convert(uplo), n, a, lda, scratchpad, scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -2608,7 +2431,6 @@ extern "C" int onemklSpotri(syclQueue_t device_queue, onemklUplo uplo, int64_t n extern "C" int onemklDpotri(syclQueue_t device_queue, onemklUplo uplo, int64_t n, double *a, int64_t lda, double *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::potri(device_queue->val, convert(uplo), n, a, lda, scratchpad, scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -2616,7 +2438,6 @@ extern "C" int onemklDpotri(syclQueue_t device_queue, onemklUplo uplo, int64_t n extern "C" int onemklCpotri(syclQueue_t device_queue, onemklUplo uplo, int64_t n, float _Complex *a, int64_t lda, float _Complex *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::potri(device_queue->val, convert(uplo), n, reinterpret_cast*>(a), lda, reinterpret_cast*>(scratchpad), scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -2624,7 +2445,6 @@ extern "C" int onemklCpotri(syclQueue_t device_queue, onemklUplo uplo, int64_t n extern "C" int onemklZpotri(syclQueue_t device_queue, onemklUplo uplo, int64_t n, double _Complex *a, int64_t lda, double _Complex *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::potri(device_queue->val, convert(uplo), n, reinterpret_cast*>(a), lda, reinterpret_cast*>(scratchpad), scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -2632,7 +2452,6 @@ extern "C" int onemklZpotri(syclQueue_t device_queue, onemklUplo uplo, int64_t n extern "C" int onemklStrtri(syclQueue_t device_queue, onemklUplo uplo, onemklDiag diag, int64_t n, float *a, int64_t lda, float *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::trtri(device_queue->val, convert(uplo), convert(diag), n, a, lda, scratchpad, scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -2640,7 +2459,6 @@ extern "C" int onemklStrtri(syclQueue_t device_queue, onemklUplo uplo, onemklDia extern "C" int onemklDtrtri(syclQueue_t device_queue, onemklUplo uplo, onemklDiag diag, int64_t n, double *a, int64_t lda, double *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::trtri(device_queue->val, convert(uplo), convert(diag), n, a, lda, scratchpad, scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -2648,7 +2466,6 @@ extern "C" int onemklDtrtri(syclQueue_t device_queue, onemklUplo uplo, onemklDia extern "C" int onemklCtrtri(syclQueue_t device_queue, onemklUplo uplo, onemklDiag diag, int64_t n, float _Complex *a, int64_t lda, float _Complex *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::trtri(device_queue->val, convert(uplo), convert(diag), n, reinterpret_cast*>(a), lda, reinterpret_cast*>(scratchpad), scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -2656,7 +2473,6 @@ extern "C" int onemklCtrtri(syclQueue_t device_queue, onemklUplo uplo, onemklDia extern "C" int onemklZtrtri(syclQueue_t device_queue, onemklUplo uplo, onemklDiag diag, int64_t n, double _Complex *a, int64_t lda, double _Complex *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::trtri(device_queue->val, convert(uplo), convert(diag), n, reinterpret_cast*>(a), lda, reinterpret_cast*>(scratchpad), scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -2664,7 +2480,6 @@ extern "C" int onemklZtrtri(syclQueue_t device_queue, onemklUplo uplo, onemklDia extern "C" int onemklSgesv(syclQueue_t device_queue, int64_t n, int64_t nrhs, float *a, int64_t lda, int64_t *ipiv, float *b, int64_t ldb, float *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::gesv(device_queue->val, n, nrhs, a, lda, ipiv, b, ldb, scratchpad, scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -2672,7 +2487,6 @@ extern "C" int onemklSgesv(syclQueue_t device_queue, int64_t n, int64_t nrhs, fl extern "C" int onemklDgesv(syclQueue_t device_queue, int64_t n, int64_t nrhs, double *a, int64_t lda, int64_t *ipiv, double *b, int64_t ldb, double *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::gesv(device_queue->val, n, nrhs, a, lda, ipiv, b, ldb, scratchpad, scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -2680,7 +2494,6 @@ extern "C" int onemklDgesv(syclQueue_t device_queue, int64_t n, int64_t nrhs, do extern "C" int onemklCgesv(syclQueue_t device_queue, int64_t n, int64_t nrhs, float _Complex *a, int64_t lda, int64_t *ipiv, float _Complex *b, int64_t ldb, float _Complex *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::gesv(device_queue->val, n, nrhs, reinterpret_cast*>(a), lda, ipiv, reinterpret_cast*>(b), ldb, reinterpret_cast*>(scratchpad), scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -2688,7 +2501,6 @@ extern "C" int onemklCgesv(syclQueue_t device_queue, int64_t n, int64_t nrhs, fl extern "C" int onemklZgesv(syclQueue_t device_queue, int64_t n, int64_t nrhs, double _Complex *a, int64_t lda, int64_t *ipiv, double _Complex *b, int64_t ldb, double _Complex *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::gesv(device_queue->val, n, nrhs, reinterpret_cast*>(a), lda, ipiv, reinterpret_cast*>(b), ldb, reinterpret_cast*>(scratchpad), scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -2696,7 +2508,6 @@ extern "C" int onemklZgesv(syclQueue_t device_queue, int64_t n, int64_t nrhs, do extern "C" int onemklCgebrd(syclQueue_t device_queue, int64_t m, int64_t n, float _Complex *a, int64_t lda, float *d, float *e, float _Complex *tauq, float _Complex *taup, float _Complex *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::gebrd(device_queue->val, m, n, reinterpret_cast*>(a), lda, d, e, reinterpret_cast*>(tauq), reinterpret_cast*>(taup), reinterpret_cast*>(scratchpad), scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -2704,7 +2515,6 @@ extern "C" int onemklCgebrd(syclQueue_t device_queue, int64_t m, int64_t n, floa extern "C" int onemklDgebrd(syclQueue_t device_queue, int64_t m, int64_t n, double *a, int64_t lda, double *d, double *e, double *tauq, double *taup, double *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::gebrd(device_queue->val, m, n, a, lda, d, e, tauq, taup, scratchpad, scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -2712,7 +2522,6 @@ extern "C" int onemklDgebrd(syclQueue_t device_queue, int64_t m, int64_t n, doub extern "C" int onemklSgebrd(syclQueue_t device_queue, int64_t m, int64_t n, float *a, int64_t lda, float *d, float *e, float *tauq, float *taup, float *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::gebrd(device_queue->val, m, n, a, lda, d, e, tauq, taup, scratchpad, scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -2720,7 +2529,6 @@ extern "C" int onemklSgebrd(syclQueue_t device_queue, int64_t m, int64_t n, floa extern "C" int onemklZgebrd(syclQueue_t device_queue, int64_t m, int64_t n, double _Complex *a, int64_t lda, double *d, double *e, double _Complex *tauq, double _Complex *taup, double _Complex *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::gebrd(device_queue->val, m, n, reinterpret_cast*>(a), lda, d, e, reinterpret_cast*>(tauq), reinterpret_cast*>(taup), reinterpret_cast*>(scratchpad), scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -2728,7 +2536,6 @@ extern "C" int onemklZgebrd(syclQueue_t device_queue, int64_t m, int64_t n, doub extern "C" int onemklCgeqrf(syclQueue_t device_queue, int64_t m, int64_t n, float _Complex *a, int64_t lda, float _Complex *tau, float _Complex *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::geqrf(device_queue->val, m, n, reinterpret_cast*>(a), lda, reinterpret_cast*>(tau), reinterpret_cast*>(scratchpad), scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -2736,7 +2543,6 @@ extern "C" int onemklCgeqrf(syclQueue_t device_queue, int64_t m, int64_t n, floa extern "C" int onemklDgeqrf(syclQueue_t device_queue, int64_t m, int64_t n, double *a, int64_t lda, double *tau, double *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::geqrf(device_queue->val, m, n, a, lda, tau, scratchpad, scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -2744,7 +2550,6 @@ extern "C" int onemklDgeqrf(syclQueue_t device_queue, int64_t m, int64_t n, doub extern "C" int onemklSgeqrf(syclQueue_t device_queue, int64_t m, int64_t n, float *a, int64_t lda, float *tau, float *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::geqrf(device_queue->val, m, n, a, lda, tau, scratchpad, scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -2752,7 +2557,6 @@ extern "C" int onemklSgeqrf(syclQueue_t device_queue, int64_t m, int64_t n, floa extern "C" int onemklZgeqrf(syclQueue_t device_queue, int64_t m, int64_t n, double _Complex *a, int64_t lda, double _Complex *tau, double _Complex *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::geqrf(device_queue->val, m, n, reinterpret_cast*>(a), lda, reinterpret_cast*>(tau), reinterpret_cast*>(scratchpad), scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -2792,7 +2596,6 @@ extern "C" int onemklZgeqrf_batch_strided(syclQueue_t device_queue, int64_t m, i extern "C" int onemklCgesvd(syclQueue_t device_queue, onemklJobsvd jobu, onemklJobsvd jobvt, int64_t m, int64_t n, float _Complex *a, int64_t lda, float *s, float _Complex *u, int64_t ldu, float _Complex *vt, int64_t ldvt, float _Complex *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::gesvd(device_queue->val, convert(jobu), convert(jobvt), m, n, reinterpret_cast*>(a), lda, s, reinterpret_cast*>(u), ldu, reinterpret_cast*>(vt), ldvt, reinterpret_cast*>(scratchpad), scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -2800,7 +2603,6 @@ extern "C" int onemklCgesvd(syclQueue_t device_queue, onemklJobsvd jobu, onemklJ extern "C" int onemklZgesvd(syclQueue_t device_queue, onemklJobsvd jobu, onemklJobsvd jobvt, int64_t m, int64_t n, double _Complex *a, int64_t lda, double *s, double _Complex *u, int64_t ldu, double _Complex *vt, int64_t ldvt, double _Complex *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::gesvd(device_queue->val, convert(jobu), convert(jobvt), m, n, reinterpret_cast*>(a), lda, s, reinterpret_cast*>(u), ldu, reinterpret_cast*>(vt), ldvt, reinterpret_cast*>(scratchpad), scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -2808,7 +2610,6 @@ extern "C" int onemklZgesvd(syclQueue_t device_queue, onemklJobsvd jobu, onemklJ extern "C" int onemklDgesvd(syclQueue_t device_queue, onemklJobsvd jobu, onemklJobsvd jobvt, int64_t m, int64_t n, double *a, int64_t lda, double *s, double *u, int64_t ldu, double *vt, int64_t ldvt, double *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::gesvd(device_queue->val, convert(jobu), convert(jobvt), m, n, a, lda, s, u, ldu, vt, ldvt, scratchpad, scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -2816,7 +2617,6 @@ extern "C" int onemklDgesvd(syclQueue_t device_queue, onemklJobsvd jobu, onemklJ extern "C" int onemklSgesvd(syclQueue_t device_queue, onemklJobsvd jobu, onemklJobsvd jobvt, int64_t m, int64_t n, float *a, int64_t lda, float *s, float *u, int64_t ldu, float *vt, int64_t ldvt, float *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::gesvd(device_queue->val, convert(jobu), convert(jobvt), m, n, a, lda, s, u, ldu, vt, ldvt, scratchpad, scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -3048,7 +2848,6 @@ extern "C" int onemklZgetrfnp_batch_strided(syclQueue_t device_queue, int64_t m, extern "C" int onemklCgetri(syclQueue_t device_queue, int64_t n, float _Complex *a, int64_t lda, int64_t *ipiv, float _Complex *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::getri(device_queue->val, n, reinterpret_cast*>(a), lda, ipiv, reinterpret_cast*>(scratchpad), scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -3056,7 +2855,6 @@ extern "C" int onemklCgetri(syclQueue_t device_queue, int64_t n, float _Complex extern "C" int onemklDgetri(syclQueue_t device_queue, int64_t n, double *a, int64_t lda, int64_t *ipiv, double *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::getri(device_queue->val, n, a, lda, ipiv, scratchpad, scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -3064,7 +2862,6 @@ extern "C" int onemklDgetri(syclQueue_t device_queue, int64_t n, double *a, int6 extern "C" int onemklSgetri(syclQueue_t device_queue, int64_t n, float *a, int64_t lda, int64_t *ipiv, float *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::getri(device_queue->val, n, a, lda, ipiv, scratchpad, scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -3072,7 +2869,6 @@ extern "C" int onemklSgetri(syclQueue_t device_queue, int64_t n, float *a, int64 extern "C" int onemklZgetri(syclQueue_t device_queue, int64_t n, double _Complex *a, int64_t lda, int64_t *ipiv, double _Complex *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::getri(device_queue->val, n, reinterpret_cast*>(a), lda, ipiv, reinterpret_cast*>(scratchpad), scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -3080,7 +2876,6 @@ extern "C" int onemklZgetri(syclQueue_t device_queue, int64_t n, double _Complex extern "C" int onemklCgetrs(syclQueue_t device_queue, onemklTranspose trans, int64_t n, int64_t nrhs, float _Complex *a, int64_t lda, int64_t *ipiv, float _Complex *b, int64_t ldb, float _Complex *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::getrs(device_queue->val, convert(trans), n, nrhs, reinterpret_cast*>(a), lda, ipiv, reinterpret_cast*>(b), ldb, reinterpret_cast*>(scratchpad), scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -3088,7 +2883,6 @@ extern "C" int onemklCgetrs(syclQueue_t device_queue, onemklTranspose trans, int extern "C" int onemklDgetrs(syclQueue_t device_queue, onemklTranspose trans, int64_t n, int64_t nrhs, double *a, int64_t lda, int64_t *ipiv, double *b, int64_t ldb, double *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::getrs(device_queue->val, convert(trans), n, nrhs, a, lda, ipiv, b, ldb, scratchpad, scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -3096,7 +2890,6 @@ extern "C" int onemklDgetrs(syclQueue_t device_queue, onemklTranspose trans, int extern "C" int onemklSgetrs(syclQueue_t device_queue, onemklTranspose trans, int64_t n, int64_t nrhs, float *a, int64_t lda, int64_t *ipiv, float *b, int64_t ldb, float *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::getrs(device_queue->val, convert(trans), n, nrhs, a, lda, ipiv, b, ldb, scratchpad, scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -3104,7 +2897,6 @@ extern "C" int onemklSgetrs(syclQueue_t device_queue, onemklTranspose trans, int extern "C" int onemklZgetrs(syclQueue_t device_queue, onemklTranspose trans, int64_t n, int64_t nrhs, double _Complex *a, int64_t lda, int64_t *ipiv, double _Complex *b, int64_t ldb, double _Complex *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::getrs(device_queue->val, convert(trans), n, nrhs, reinterpret_cast*>(a), lda, ipiv, reinterpret_cast*>(b), ldb, reinterpret_cast*>(scratchpad), scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -3192,7 +2984,6 @@ extern "C" int onemklZheev(syclQueue_t device_queue, onemklCompz jobz, onemklUpl extern "C" int onemklCheevd(syclQueue_t device_queue, onemklJob jobz, onemklUplo uplo, int64_t n, float _Complex *a, int64_t lda, float *w, float _Complex *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::heevd(device_queue->val, convert(jobz), convert(uplo), n, reinterpret_cast*>(a), lda, w, reinterpret_cast*>(scratchpad), scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -3200,7 +2991,6 @@ extern "C" int onemklCheevd(syclQueue_t device_queue, onemklJob jobz, onemklUplo extern "C" int onemklZheevd(syclQueue_t device_queue, onemklJob jobz, onemklUplo uplo, int64_t n, double _Complex *a, int64_t lda, double *w, double _Complex *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::heevd(device_queue->val, convert(jobz), convert(uplo), n, reinterpret_cast*>(a), lda, w, reinterpret_cast*>(scratchpad), scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -3224,7 +3014,6 @@ extern "C" int onemklZheevx(syclQueue_t device_queue, onemklCompz jobz, onemklRa extern "C" int onemklChegvd(syclQueue_t device_queue, int64_t itype, onemklJob jobz, onemklUplo uplo, int64_t n, float _Complex *a, int64_t lda, float _Complex *b, int64_t ldb, float *w, float _Complex *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::hegvd(device_queue->val, itype, convert(jobz), convert(uplo), n, reinterpret_cast*>(a), lda, reinterpret_cast*>(b), ldb, w, reinterpret_cast*>(scratchpad), scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -3232,7 +3021,6 @@ extern "C" int onemklChegvd(syclQueue_t device_queue, int64_t itype, onemklJob j extern "C" int onemklZhegvd(syclQueue_t device_queue, int64_t itype, onemklJob jobz, onemklUplo uplo, int64_t n, double _Complex *a, int64_t lda, double _Complex *b, int64_t ldb, double *w, double _Complex *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::hegvd(device_queue->val, itype, convert(jobz), convert(uplo), n, reinterpret_cast*>(a), lda, reinterpret_cast*>(b), ldb, w, reinterpret_cast*>(scratchpad), scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -3304,7 +3092,6 @@ extern "C" int onemklDorgbr(syclQueue_t device_queue, onemklGenerate vec, int64_ extern "C" int onemklDorgqr(syclQueue_t device_queue, int64_t m, int64_t n, int64_t k, double *a, int64_t lda, double *tau, double *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::orgqr(device_queue->val, m, n, k, a, lda, tau, scratchpad, scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -3312,7 +3099,6 @@ extern "C" int onemklDorgqr(syclQueue_t device_queue, int64_t m, int64_t n, int6 extern "C" int onemklSorgqr(syclQueue_t device_queue, int64_t m, int64_t n, int64_t k, float *a, int64_t lda, float *tau, float *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::orgqr(device_queue->val, m, n, k, a, lda, tau, scratchpad, scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -3320,7 +3106,6 @@ extern "C" int onemklSorgqr(syclQueue_t device_queue, int64_t m, int64_t n, int6 extern "C" int onemklDormqr(syclQueue_t device_queue, onemklSide side, onemklTranspose trans, int64_t m, int64_t n, int64_t k, double *a, int64_t lda, double *tau, double *c, int64_t ldc, double *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::ormqr(device_queue->val, convert(side), convert(trans), m, n, k, a, lda, tau, c, ldc, scratchpad, scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -3328,7 +3113,6 @@ extern "C" int onemklDormqr(syclQueue_t device_queue, onemklSide side, onemklTra extern "C" int onemklSormqr(syclQueue_t device_queue, onemklSide side, onemklTranspose trans, int64_t m, int64_t n, int64_t k, float *a, int64_t lda, float *tau, float *c, int64_t ldc, float *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::ormqr(device_queue->val, convert(side), convert(trans), m, n, k, a, lda, tau, c, ldc, scratchpad, scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -3384,7 +3168,6 @@ extern "C" int onemklSsyev(syclQueue_t device_queue, onemklCompz jobz, onemklUpl extern "C" int onemklDsyevd(syclQueue_t device_queue, onemklJob jobz, onemklUplo uplo, int64_t n, double *a, int64_t lda, double *w, double *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::syevd(device_queue->val, convert(jobz), convert(uplo), n, a, lda, w, scratchpad, scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -3392,7 +3175,6 @@ extern "C" int onemklDsyevd(syclQueue_t device_queue, onemklJob jobz, onemklUplo extern "C" int onemklSsyevd(syclQueue_t device_queue, onemklJob jobz, onemklUplo uplo, int64_t n, float *a, int64_t lda, float *w, float *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::syevd(device_queue->val, convert(jobz), convert(uplo), n, a, lda, w, scratchpad, scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -3416,7 +3198,6 @@ extern "C" int onemklSsyevx(syclQueue_t device_queue, onemklCompz jobz, onemklRa extern "C" int onemklDsygvd(syclQueue_t device_queue, int64_t itype, onemklJob jobz, onemklUplo uplo, int64_t n, double *a, int64_t lda, double *b, int64_t ldb, double *w, double *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::sygvd(device_queue->val, itype, convert(jobz), convert(uplo), n, a, lda, b, ldb, w, scratchpad, scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -3424,7 +3205,6 @@ extern "C" int onemklDsygvd(syclQueue_t device_queue, int64_t itype, onemklJob j extern "C" int onemklSsygvd(syclQueue_t device_queue, int64_t itype, onemklJob jobz, onemklUplo uplo, int64_t n, float *a, int64_t lda, float *b, int64_t ldb, float *w, float *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::sygvd(device_queue->val, itype, convert(jobz), convert(uplo), n, a, lda, b, ldb, w, scratchpad, scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -3512,7 +3292,6 @@ extern "C" int onemklZungbr(syclQueue_t device_queue, onemklGenerate vec, int64_ extern "C" int onemklCungqr(syclQueue_t device_queue, int64_t m, int64_t n, int64_t k, float _Complex *a, int64_t lda, float _Complex *tau, float _Complex *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::ungqr(device_queue->val, m, n, k, reinterpret_cast*>(a), lda, reinterpret_cast*>(tau), reinterpret_cast*>(scratchpad), scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -3520,7 +3299,6 @@ extern "C" int onemklCungqr(syclQueue_t device_queue, int64_t m, int64_t n, int6 extern "C" int onemklZungqr(syclQueue_t device_queue, int64_t m, int64_t n, int64_t k, double _Complex *a, int64_t lda, double _Complex *tau, double _Complex *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::ungqr(device_queue->val, m, n, k, reinterpret_cast*>(a), lda, reinterpret_cast*>(tau), reinterpret_cast*>(scratchpad), scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -3528,7 +3306,6 @@ extern "C" int onemklZungqr(syclQueue_t device_queue, int64_t m, int64_t n, int6 extern "C" int onemklCunmqr(syclQueue_t device_queue, onemklSide side, onemklTranspose trans, int64_t m, int64_t n, int64_t k, float _Complex *a, int64_t lda, float _Complex *tau, float _Complex *c, int64_t ldc, float _Complex *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::unmqr(device_queue->val, convert(side), convert(trans), m, n, k, reinterpret_cast*>(a), lda, reinterpret_cast*>(tau), reinterpret_cast*>(c), ldc, reinterpret_cast*>(scratchpad), scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -3536,7 +3313,6 @@ extern "C" int onemklCunmqr(syclQueue_t device_queue, onemklSide side, onemklTra extern "C" int onemklZunmqr(syclQueue_t device_queue, onemklSide side, onemklTranspose trans, int64_t m, int64_t n, int64_t k, double _Complex *a, int64_t lda, double _Complex *tau, double _Complex *c, int64_t ldc, double _Complex *scratchpad, int64_t scratchpad_size) { try { auto status = oneapi::mkl::lapack::unmqr(device_queue->val, convert(side), convert(trans), m, n, k, reinterpret_cast*>(a), lda, reinterpret_cast*>(tau), reinterpret_cast*>(c), ldc, reinterpret_cast*>(scratchpad), scratchpad_size, {}); - device_queue->val.wait_and_throw(); } catch (const oneapi::mkl::lapack::computation_error& e) { return e.info(); } catch (const sycl::exception& e) { return -1; } return 0; } @@ -4215,1261 +3991,1051 @@ extern "C" int onemklZgels_batch_strided(syclQueue_t device_queue, onemklTranspo extern "C" int64_t onemklSgebrd_scratchpad_size(syclQueue_t device_queue, int64_t m, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::gebrd_scratchpad_size(device_queue->val, m, n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDgebrd_scratchpad_size(syclQueue_t device_queue, int64_t m, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::gebrd_scratchpad_size(device_queue->val, m, n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCgebrd_scratchpad_size(syclQueue_t device_queue, int64_t m, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::gebrd_scratchpad_size>(device_queue->val, m, n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZgebrd_scratchpad_size(syclQueue_t device_queue, int64_t m, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::gebrd_scratchpad_size>(device_queue->val, m, n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSgels_scratchpad_size(syclQueue_t device_queue, onemklTranspose trans, int64_t m, int64_t n, int64_t nrhs, int64_t lda, int64_t ldb) { int64_t scratchpad_size = oneapi::mkl::lapack::gels_scratchpad_size(device_queue->val, convert(trans), m, n, nrhs, lda, ldb); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDgels_scratchpad_size(syclQueue_t device_queue, onemklTranspose trans, int64_t m, int64_t n, int64_t nrhs, int64_t lda, int64_t ldb) { int64_t scratchpad_size = oneapi::mkl::lapack::gels_scratchpad_size(device_queue->val, convert(trans), m, n, nrhs, lda, ldb); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCgels_scratchpad_size(syclQueue_t device_queue, onemklTranspose trans, int64_t m, int64_t n, int64_t nrhs, int64_t lda, int64_t ldb) { int64_t scratchpad_size = oneapi::mkl::lapack::gels_scratchpad_size>(device_queue->val, convert(trans), m, n, nrhs, lda, ldb); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZgels_scratchpad_size(syclQueue_t device_queue, onemklTranspose trans, int64_t m, int64_t n, int64_t nrhs, int64_t lda, int64_t ldb) { int64_t scratchpad_size = oneapi::mkl::lapack::gels_scratchpad_size>(device_queue->val, convert(trans), m, n, nrhs, lda, ldb); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSgeqrf_scratchpad_size(syclQueue_t device_queue, int64_t m, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::geqrf_scratchpad_size(device_queue->val, m, n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDgeqrf_scratchpad_size(syclQueue_t device_queue, int64_t m, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::geqrf_scratchpad_size(device_queue->val, m, n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCgeqrf_scratchpad_size(syclQueue_t device_queue, int64_t m, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::geqrf_scratchpad_size>(device_queue->val, m, n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZgeqrf_scratchpad_size(syclQueue_t device_queue, int64_t m, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::geqrf_scratchpad_size>(device_queue->val, m, n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSgerqf_scratchpad_size(syclQueue_t device_queue, int64_t m, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::gerqf_scratchpad_size(device_queue->val, m, n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDgerqf_scratchpad_size(syclQueue_t device_queue, int64_t m, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::gerqf_scratchpad_size(device_queue->val, m, n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCgerqf_scratchpad_size(syclQueue_t device_queue, int64_t m, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::gerqf_scratchpad_size>(device_queue->val, m, n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZgerqf_scratchpad_size(syclQueue_t device_queue, int64_t m, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::gerqf_scratchpad_size>(device_queue->val, m, n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSgesv_scratchpad_size(syclQueue_t device_queue, int64_t n, int64_t nrhs, int64_t lda, int64_t ldb) { int64_t scratchpad_size = oneapi::mkl::lapack::gesv_scratchpad_size(device_queue->val, n, nrhs, lda, ldb); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDgesv_scratchpad_size(syclQueue_t device_queue, int64_t n, int64_t nrhs, int64_t lda, int64_t ldb) { int64_t scratchpad_size = oneapi::mkl::lapack::gesv_scratchpad_size(device_queue->val, n, nrhs, lda, ldb); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCgesv_scratchpad_size(syclQueue_t device_queue, int64_t n, int64_t nrhs, int64_t lda, int64_t ldb) { int64_t scratchpad_size = oneapi::mkl::lapack::gesv_scratchpad_size>(device_queue->val, n, nrhs, lda, ldb); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZgesv_scratchpad_size(syclQueue_t device_queue, int64_t n, int64_t nrhs, int64_t lda, int64_t ldb) { int64_t scratchpad_size = oneapi::mkl::lapack::gesv_scratchpad_size>(device_queue->val, n, nrhs, lda, ldb); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSgesvd_scratchpad_size(syclQueue_t device_queue, onemklJobsvd jobu, onemklJobsvd jobvt, int64_t m, int64_t n, int64_t lda, int64_t ldu, int64_t ldvt) { int64_t scratchpad_size = oneapi::mkl::lapack::gesvd_scratchpad_size(device_queue->val, convert(jobu), convert(jobvt), m, n, lda, ldu, ldvt); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDgesvd_scratchpad_size(syclQueue_t device_queue, onemklJobsvd jobu, onemklJobsvd jobvt, int64_t m, int64_t n, int64_t lda, int64_t ldu, int64_t ldvt) { int64_t scratchpad_size = oneapi::mkl::lapack::gesvd_scratchpad_size(device_queue->val, convert(jobu), convert(jobvt), m, n, lda, ldu, ldvt); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCgesvd_scratchpad_size(syclQueue_t device_queue, onemklJobsvd jobu, onemklJobsvd jobvt, int64_t m, int64_t n, int64_t lda, int64_t ldu, int64_t ldvt) { int64_t scratchpad_size = oneapi::mkl::lapack::gesvd_scratchpad_size>(device_queue->val, convert(jobu), convert(jobvt), m, n, lda, ldu, ldvt); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZgesvd_scratchpad_size(syclQueue_t device_queue, onemklJobsvd jobu, onemklJobsvd jobvt, int64_t m, int64_t n, int64_t lda, int64_t ldu, int64_t ldvt) { int64_t scratchpad_size = oneapi::mkl::lapack::gesvd_scratchpad_size>(device_queue->val, convert(jobu), convert(jobvt), m, n, lda, ldu, ldvt); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSgetrf_scratchpad_size(syclQueue_t device_queue, int64_t m, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::getrf_scratchpad_size(device_queue->val, m, n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDgetrf_scratchpad_size(syclQueue_t device_queue, int64_t m, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::getrf_scratchpad_size(device_queue->val, m, n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCgetrf_scratchpad_size(syclQueue_t device_queue, int64_t m, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::getrf_scratchpad_size>(device_queue->val, m, n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZgetrf_scratchpad_size(syclQueue_t device_queue, int64_t m, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::getrf_scratchpad_size>(device_queue->val, m, n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSgetrfnp_scratchpad_size(syclQueue_t device_queue, int64_t m, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::getrfnp_scratchpad_size(device_queue->val, m, n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDgetrfnp_scratchpad_size(syclQueue_t device_queue, int64_t m, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::getrfnp_scratchpad_size(device_queue->val, m, n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCgetrfnp_scratchpad_size(syclQueue_t device_queue, int64_t m, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::getrfnp_scratchpad_size>(device_queue->val, m, n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZgetrfnp_scratchpad_size(syclQueue_t device_queue, int64_t m, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::getrfnp_scratchpad_size>(device_queue->val, m, n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSgetri_scratchpad_size(syclQueue_t device_queue, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::getri_scratchpad_size(device_queue->val, n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDgetri_scratchpad_size(syclQueue_t device_queue, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::getri_scratchpad_size(device_queue->val, n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCgetri_scratchpad_size(syclQueue_t device_queue, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::getri_scratchpad_size>(device_queue->val, n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZgetri_scratchpad_size(syclQueue_t device_queue, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::getri_scratchpad_size>(device_queue->val, n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSgetrs_scratchpad_size(syclQueue_t device_queue, onemklTranspose trans, int64_t n, int64_t nrhs, int64_t lda, int64_t ldb) { int64_t scratchpad_size = oneapi::mkl::lapack::getrs_scratchpad_size(device_queue->val, convert(trans), n, nrhs, lda, ldb); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDgetrs_scratchpad_size(syclQueue_t device_queue, onemklTranspose trans, int64_t n, int64_t nrhs, int64_t lda, int64_t ldb) { int64_t scratchpad_size = oneapi::mkl::lapack::getrs_scratchpad_size(device_queue->val, convert(trans), n, nrhs, lda, ldb); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCgetrs_scratchpad_size(syclQueue_t device_queue, onemklTranspose trans, int64_t n, int64_t nrhs, int64_t lda, int64_t ldb) { int64_t scratchpad_size = oneapi::mkl::lapack::getrs_scratchpad_size>(device_queue->val, convert(trans), n, nrhs, lda, ldb); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZgetrs_scratchpad_size(syclQueue_t device_queue, onemklTranspose trans, int64_t n, int64_t nrhs, int64_t lda, int64_t ldb) { int64_t scratchpad_size = oneapi::mkl::lapack::getrs_scratchpad_size>(device_queue->val, convert(trans), n, nrhs, lda, ldb); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCheev_scratchpad_size(syclQueue_t device_queue, onemklCompz jobz, onemklUplo uplo, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::heev_scratchpad_size>(device_queue->val, convert(jobz), convert(uplo), n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZheev_scratchpad_size(syclQueue_t device_queue, onemklCompz jobz, onemklUplo uplo, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::heev_scratchpad_size>(device_queue->val, convert(jobz), convert(uplo), n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCheevd_scratchpad_size(syclQueue_t device_queue, onemklJob jobz, onemklUplo uplo, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::heevd_scratchpad_size>(device_queue->val, convert(jobz), convert(uplo), n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZheevd_scratchpad_size(syclQueue_t device_queue, onemklJob jobz, onemklUplo uplo, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::heevd_scratchpad_size>(device_queue->val, convert(jobz), convert(uplo), n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCheevx_scratchpad_size(syclQueue_t device_queue, onemklCompz jobz, onemklRangev range, onemklUplo uplo, int64_t n, int64_t lda, float *vl, float *vu, int64_t il, int64_t iu, float *abstol, int64_t ldz) { int64_t scratchpad_size = oneapi::mkl::lapack::heevx_scratchpad_size>(device_queue->val, convert(jobz), convert(range), convert(uplo), n, lda, *vl, *vu, il, iu, *abstol, ldz); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZheevx_scratchpad_size(syclQueue_t device_queue, onemklCompz jobz, onemklRangev range, onemklUplo uplo, int64_t n, int64_t lda, double *vl, double *vu, int64_t il, int64_t iu, double *abstol, int64_t ldz) { int64_t scratchpad_size = oneapi::mkl::lapack::heevx_scratchpad_size>(device_queue->val, convert(jobz), convert(range), convert(uplo), n, lda, *vl, *vu, il, iu, *abstol, ldz); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklChegvd_scratchpad_size(syclQueue_t device_queue, int64_t itype, onemklJob jobz, onemklUplo uplo, int64_t n, int64_t lda, int64_t ldb) { int64_t scratchpad_size = oneapi::mkl::lapack::hegvd_scratchpad_size>(device_queue->val, itype, convert(jobz), convert(uplo), n, lda, ldb); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZhegvd_scratchpad_size(syclQueue_t device_queue, int64_t itype, onemklJob jobz, onemklUplo uplo, int64_t n, int64_t lda, int64_t ldb) { int64_t scratchpad_size = oneapi::mkl::lapack::hegvd_scratchpad_size>(device_queue->val, itype, convert(jobz), convert(uplo), n, lda, ldb); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklChegvx_scratchpad_size(syclQueue_t device_queue, int64_t itype, onemklCompz jobz, onemklRangev range, onemklUplo uplo, int64_t n, int64_t lda, int64_t ldb, float *vl, float *vu, int64_t il, int64_t iu, float *abstol, int64_t ldz) { int64_t scratchpad_size = oneapi::mkl::lapack::hegvx_scratchpad_size>(device_queue->val, itype, convert(jobz), convert(range), convert(uplo), n, lda, ldb, *vl, *vu, il, iu, *abstol, ldz); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZhegvx_scratchpad_size(syclQueue_t device_queue, int64_t itype, onemklCompz jobz, onemklRangev range, onemklUplo uplo, int64_t n, int64_t lda, int64_t ldb, double *vl, double *vu, int64_t il, int64_t iu, double *abstol, int64_t ldz) { int64_t scratchpad_size = oneapi::mkl::lapack::hegvx_scratchpad_size>(device_queue->val, itype, convert(jobz), convert(range), convert(uplo), n, lda, ldb, *vl, *vu, il, iu, *abstol, ldz); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklChetrd_scratchpad_size(syclQueue_t device_queue, onemklUplo uplo, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::hetrd_scratchpad_size>(device_queue->val, convert(uplo), n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZhetrd_scratchpad_size(syclQueue_t device_queue, onemklUplo uplo, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::hetrd_scratchpad_size>(device_queue->val, convert(uplo), n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklChetrf_scratchpad_size(syclQueue_t device_queue, onemklUplo uplo, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::hetrf_scratchpad_size>(device_queue->val, convert(uplo), n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZhetrf_scratchpad_size(syclQueue_t device_queue, onemklUplo uplo, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::hetrf_scratchpad_size>(device_queue->val, convert(uplo), n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSorgbr_scratchpad_size(syclQueue_t device_queue, onemklGenerate vect, int64_t m, int64_t n, int64_t k, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::orgbr_scratchpad_size(device_queue->val, convert(vect), m, n, k, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDorgbr_scratchpad_size(syclQueue_t device_queue, onemklGenerate vect, int64_t m, int64_t n, int64_t k, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::orgbr_scratchpad_size(device_queue->val, convert(vect), m, n, k, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSorgqr_scratchpad_size(syclQueue_t device_queue, int64_t m, int64_t n, int64_t k, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::orgqr_scratchpad_size(device_queue->val, m, n, k, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDorgqr_scratchpad_size(syclQueue_t device_queue, int64_t m, int64_t n, int64_t k, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::orgqr_scratchpad_size(device_queue->val, m, n, k, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSorgtr_scratchpad_size(syclQueue_t device_queue, onemklUplo uplo, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::orgtr_scratchpad_size(device_queue->val, convert(uplo), n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDorgtr_scratchpad_size(syclQueue_t device_queue, onemklUplo uplo, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::orgtr_scratchpad_size(device_queue->val, convert(uplo), n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSormqr_scratchpad_size(syclQueue_t device_queue, onemklSide side, onemklTranspose trans, int64_t m, int64_t n, int64_t k, int64_t lda, int64_t ldc) { int64_t scratchpad_size = oneapi::mkl::lapack::ormqr_scratchpad_size(device_queue->val, convert(side), convert(trans), m, n, k, lda, ldc); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDormqr_scratchpad_size(syclQueue_t device_queue, onemklSide side, onemklTranspose trans, int64_t m, int64_t n, int64_t k, int64_t lda, int64_t ldc) { int64_t scratchpad_size = oneapi::mkl::lapack::ormqr_scratchpad_size(device_queue->val, convert(side), convert(trans), m, n, k, lda, ldc); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSormrq_scratchpad_size(syclQueue_t device_queue, onemklSide side, onemklTranspose trans, int64_t m, int64_t n, int64_t k, int64_t lda, int64_t ldc) { int64_t scratchpad_size = oneapi::mkl::lapack::ormrq_scratchpad_size(device_queue->val, convert(side), convert(trans), m, n, k, lda, ldc); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDormrq_scratchpad_size(syclQueue_t device_queue, onemklSide side, onemklTranspose trans, int64_t m, int64_t n, int64_t k, int64_t lda, int64_t ldc) { int64_t scratchpad_size = oneapi::mkl::lapack::ormrq_scratchpad_size(device_queue->val, convert(side), convert(trans), m, n, k, lda, ldc); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSormtr_scratchpad_size(syclQueue_t device_queue, onemklSide side, onemklUplo uplo, onemklTranspose trans, int64_t m, int64_t n, int64_t lda, int64_t ldc) { int64_t scratchpad_size = oneapi::mkl::lapack::ormtr_scratchpad_size(device_queue->val, convert(side), convert(uplo), convert(trans), m, n, lda, ldc); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDormtr_scratchpad_size(syclQueue_t device_queue, onemklSide side, onemklUplo uplo, onemklTranspose trans, int64_t m, int64_t n, int64_t lda, int64_t ldc) { int64_t scratchpad_size = oneapi::mkl::lapack::ormtr_scratchpad_size(device_queue->val, convert(side), convert(uplo), convert(trans), m, n, lda, ldc); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSpotrf_scratchpad_size(syclQueue_t device_queue, onemklUplo uplo, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::potrf_scratchpad_size(device_queue->val, convert(uplo), n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDpotrf_scratchpad_size(syclQueue_t device_queue, onemklUplo uplo, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::potrf_scratchpad_size(device_queue->val, convert(uplo), n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCpotrf_scratchpad_size(syclQueue_t device_queue, onemklUplo uplo, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::potrf_scratchpad_size>(device_queue->val, convert(uplo), n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZpotrf_scratchpad_size(syclQueue_t device_queue, onemklUplo uplo, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::potrf_scratchpad_size>(device_queue->val, convert(uplo), n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSpotri_scratchpad_size(syclQueue_t device_queue, onemklUplo uplo, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::potri_scratchpad_size(device_queue->val, convert(uplo), n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDpotri_scratchpad_size(syclQueue_t device_queue, onemklUplo uplo, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::potri_scratchpad_size(device_queue->val, convert(uplo), n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCpotri_scratchpad_size(syclQueue_t device_queue, onemklUplo uplo, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::potri_scratchpad_size>(device_queue->val, convert(uplo), n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZpotri_scratchpad_size(syclQueue_t device_queue, onemklUplo uplo, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::potri_scratchpad_size>(device_queue->val, convert(uplo), n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSpotrs_scratchpad_size(syclQueue_t device_queue, onemklUplo uplo, int64_t n, int64_t nrhs, int64_t lda, int64_t ldb) { int64_t scratchpad_size = oneapi::mkl::lapack::potrs_scratchpad_size(device_queue->val, convert(uplo), n, nrhs, lda, ldb); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDpotrs_scratchpad_size(syclQueue_t device_queue, onemklUplo uplo, int64_t n, int64_t nrhs, int64_t lda, int64_t ldb) { int64_t scratchpad_size = oneapi::mkl::lapack::potrs_scratchpad_size(device_queue->val, convert(uplo), n, nrhs, lda, ldb); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCpotrs_scratchpad_size(syclQueue_t device_queue, onemklUplo uplo, int64_t n, int64_t nrhs, int64_t lda, int64_t ldb) { int64_t scratchpad_size = oneapi::mkl::lapack::potrs_scratchpad_size>(device_queue->val, convert(uplo), n, nrhs, lda, ldb); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZpotrs_scratchpad_size(syclQueue_t device_queue, onemklUplo uplo, int64_t n, int64_t nrhs, int64_t lda, int64_t ldb) { int64_t scratchpad_size = oneapi::mkl::lapack::potrs_scratchpad_size>(device_queue->val, convert(uplo), n, nrhs, lda, ldb); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSsteqr_scratchpad_size(syclQueue_t device_queue, onemklCompz compz, int64_t n, int64_t ldz) { int64_t scratchpad_size = oneapi::mkl::lapack::steqr_scratchpad_size(device_queue->val, convert(compz), n, ldz); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDsteqr_scratchpad_size(syclQueue_t device_queue, onemklCompz compz, int64_t n, int64_t ldz) { int64_t scratchpad_size = oneapi::mkl::lapack::steqr_scratchpad_size(device_queue->val, convert(compz), n, ldz); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCsteqr_scratchpad_size(syclQueue_t device_queue, onemklCompz compz, int64_t n, int64_t ldz) { int64_t scratchpad_size = oneapi::mkl::lapack::steqr_scratchpad_size>(device_queue->val, convert(compz), n, ldz); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZsteqr_scratchpad_size(syclQueue_t device_queue, onemklCompz compz, int64_t n, int64_t ldz) { int64_t scratchpad_size = oneapi::mkl::lapack::steqr_scratchpad_size>(device_queue->val, convert(compz), n, ldz); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSsyev_scratchpad_size(syclQueue_t device_queue, onemklCompz jobz, onemklUplo uplo, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::syev_scratchpad_size(device_queue->val, convert(jobz), convert(uplo), n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDsyev_scratchpad_size(syclQueue_t device_queue, onemklCompz jobz, onemklUplo uplo, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::syev_scratchpad_size(device_queue->val, convert(jobz), convert(uplo), n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSsyevd_scratchpad_size(syclQueue_t device_queue, onemklJob jobz, onemklUplo uplo, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::syevd_scratchpad_size(device_queue->val, convert(jobz), convert(uplo), n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDsyevd_scratchpad_size(syclQueue_t device_queue, onemklJob jobz, onemklUplo uplo, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::syevd_scratchpad_size(device_queue->val, convert(jobz), convert(uplo), n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSsyevx_scratchpad_size(syclQueue_t device_queue, onemklCompz jobz, onemklRangev range, onemklUplo uplo, int64_t n, int64_t lda, float *vl, float *vu, int64_t il, int64_t iu, float *abstol, int64_t ldz) { int64_t scratchpad_size = oneapi::mkl::lapack::syevx_scratchpad_size(device_queue->val, convert(jobz), convert(range), convert(uplo), n, lda, *vl, *vu, il, iu, *abstol, ldz); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDsyevx_scratchpad_size(syclQueue_t device_queue, onemklCompz jobz, onemklRangev range, onemklUplo uplo, int64_t n, int64_t lda, double *vl, double *vu, int64_t il, int64_t iu, double *abstol, int64_t ldz) { int64_t scratchpad_size = oneapi::mkl::lapack::syevx_scratchpad_size(device_queue->val, convert(jobz), convert(range), convert(uplo), n, lda, *vl, *vu, il, iu, *abstol, ldz); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSsygvd_scratchpad_size(syclQueue_t device_queue, int64_t itype, onemklJob jobz, onemklUplo uplo, int64_t n, int64_t lda, int64_t ldb) { int64_t scratchpad_size = oneapi::mkl::lapack::sygvd_scratchpad_size(device_queue->val, itype, convert(jobz), convert(uplo), n, lda, ldb); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDsygvd_scratchpad_size(syclQueue_t device_queue, int64_t itype, onemklJob jobz, onemklUplo uplo, int64_t n, int64_t lda, int64_t ldb) { int64_t scratchpad_size = oneapi::mkl::lapack::sygvd_scratchpad_size(device_queue->val, itype, convert(jobz), convert(uplo), n, lda, ldb); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSsygvx_scratchpad_size(syclQueue_t device_queue, int64_t itype, onemklCompz jobz, onemklRangev range, onemklUplo uplo, int64_t n, int64_t lda, int64_t ldb, float *vl, float *vu, int64_t il, int64_t iu, float *abstol, int64_t ldz) { int64_t scratchpad_size = oneapi::mkl::lapack::sygvx_scratchpad_size(device_queue->val, itype, convert(jobz), convert(range), convert(uplo), n, lda, ldb, *vl, *vu, il, iu, *abstol, ldz); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDsygvx_scratchpad_size(syclQueue_t device_queue, int64_t itype, onemklCompz jobz, onemklRangev range, onemklUplo uplo, int64_t n, int64_t lda, int64_t ldb, double *vl, double *vu, int64_t il, int64_t iu, double *abstol, int64_t ldz) { int64_t scratchpad_size = oneapi::mkl::lapack::sygvx_scratchpad_size(device_queue->val, itype, convert(jobz), convert(range), convert(uplo), n, lda, ldb, *vl, *vu, il, iu, *abstol, ldz); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSsytrd_scratchpad_size(syclQueue_t device_queue, onemklUplo uplo, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::sytrd_scratchpad_size(device_queue->val, convert(uplo), n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDsytrd_scratchpad_size(syclQueue_t device_queue, onemklUplo uplo, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::sytrd_scratchpad_size(device_queue->val, convert(uplo), n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSsytrf_scratchpad_size(syclQueue_t device_queue, onemklUplo uplo, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::sytrf_scratchpad_size(device_queue->val, convert(uplo), n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDsytrf_scratchpad_size(syclQueue_t device_queue, onemklUplo uplo, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::sytrf_scratchpad_size(device_queue->val, convert(uplo), n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCsytrf_scratchpad_size(syclQueue_t device_queue, onemklUplo uplo, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::sytrf_scratchpad_size>(device_queue->val, convert(uplo), n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZsytrf_scratchpad_size(syclQueue_t device_queue, onemklUplo uplo, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::sytrf_scratchpad_size>(device_queue->val, convert(uplo), n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklStrtri_scratchpad_size(syclQueue_t device_queue, onemklUplo uplo, onemklDiag diag, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::trtri_scratchpad_size(device_queue->val, convert(uplo), convert(diag), n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDtrtri_scratchpad_size(syclQueue_t device_queue, onemklUplo uplo, onemklDiag diag, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::trtri_scratchpad_size(device_queue->val, convert(uplo), convert(diag), n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCtrtri_scratchpad_size(syclQueue_t device_queue, onemklUplo uplo, onemklDiag diag, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::trtri_scratchpad_size>(device_queue->val, convert(uplo), convert(diag), n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZtrtri_scratchpad_size(syclQueue_t device_queue, onemklUplo uplo, onemklDiag diag, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::trtri_scratchpad_size>(device_queue->val, convert(uplo), convert(diag), n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklStrtrs_scratchpad_size(syclQueue_t device_queue, onemklUplo uplo, onemklTranspose trans, onemklDiag diag, int64_t n, int64_t nrhs, int64_t lda, int64_t ldb) { int64_t scratchpad_size = oneapi::mkl::lapack::trtrs_scratchpad_size(device_queue->val, convert(uplo), convert(trans), convert(diag), n, nrhs, lda, ldb); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDtrtrs_scratchpad_size(syclQueue_t device_queue, onemklUplo uplo, onemklTranspose trans, onemklDiag diag, int64_t n, int64_t nrhs, int64_t lda, int64_t ldb) { int64_t scratchpad_size = oneapi::mkl::lapack::trtrs_scratchpad_size(device_queue->val, convert(uplo), convert(trans), convert(diag), n, nrhs, lda, ldb); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCtrtrs_scratchpad_size(syclQueue_t device_queue, onemklUplo uplo, onemklTranspose trans, onemklDiag diag, int64_t n, int64_t nrhs, int64_t lda, int64_t ldb) { int64_t scratchpad_size = oneapi::mkl::lapack::trtrs_scratchpad_size>(device_queue->val, convert(uplo), convert(trans), convert(diag), n, nrhs, lda, ldb); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZtrtrs_scratchpad_size(syclQueue_t device_queue, onemklUplo uplo, onemklTranspose trans, onemklDiag diag, int64_t n, int64_t nrhs, int64_t lda, int64_t ldb) { int64_t scratchpad_size = oneapi::mkl::lapack::trtrs_scratchpad_size>(device_queue->val, convert(uplo), convert(trans), convert(diag), n, nrhs, lda, ldb); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCungbr_scratchpad_size(syclQueue_t device_queue, onemklGenerate vect, int64_t m, int64_t n, int64_t k, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::ungbr_scratchpad_size>(device_queue->val, convert(vect), m, n, k, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZungbr_scratchpad_size(syclQueue_t device_queue, onemklGenerate vect, int64_t m, int64_t n, int64_t k, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::ungbr_scratchpad_size>(device_queue->val, convert(vect), m, n, k, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCungqr_scratchpad_size(syclQueue_t device_queue, int64_t m, int64_t n, int64_t k, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::ungqr_scratchpad_size>(device_queue->val, m, n, k, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZungqr_scratchpad_size(syclQueue_t device_queue, int64_t m, int64_t n, int64_t k, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::ungqr_scratchpad_size>(device_queue->val, m, n, k, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCungtr_scratchpad_size(syclQueue_t device_queue, onemklUplo uplo, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::ungtr_scratchpad_size>(device_queue->val, convert(uplo), n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZungtr_scratchpad_size(syclQueue_t device_queue, onemklUplo uplo, int64_t n, int64_t lda) { int64_t scratchpad_size = oneapi::mkl::lapack::ungtr_scratchpad_size>(device_queue->val, convert(uplo), n, lda); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCunmqr_scratchpad_size(syclQueue_t device_queue, onemklSide side, onemklTranspose trans, int64_t m, int64_t n, int64_t k, int64_t lda, int64_t ldc) { int64_t scratchpad_size = oneapi::mkl::lapack::unmqr_scratchpad_size>(device_queue->val, convert(side), convert(trans), m, n, k, lda, ldc); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZunmqr_scratchpad_size(syclQueue_t device_queue, onemklSide side, onemklTranspose trans, int64_t m, int64_t n, int64_t k, int64_t lda, int64_t ldc) { int64_t scratchpad_size = oneapi::mkl::lapack::unmqr_scratchpad_size>(device_queue->val, convert(side), convert(trans), m, n, k, lda, ldc); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCunmrq_scratchpad_size(syclQueue_t device_queue, onemklSide side, onemklTranspose trans, int64_t m, int64_t n, int64_t k, int64_t lda, int64_t ldc) { int64_t scratchpad_size = oneapi::mkl::lapack::unmrq_scratchpad_size>(device_queue->val, convert(side), convert(trans), m, n, k, lda, ldc); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZunmrq_scratchpad_size(syclQueue_t device_queue, onemklSide side, onemklTranspose trans, int64_t m, int64_t n, int64_t k, int64_t lda, int64_t ldc) { int64_t scratchpad_size = oneapi::mkl::lapack::unmrq_scratchpad_size>(device_queue->val, convert(side), convert(trans), m, n, k, lda, ldc); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCunmtr_scratchpad_size(syclQueue_t device_queue, onemklSide side, onemklUplo uplo, onemklTranspose trans, int64_t m, int64_t n, int64_t lda, int64_t ldc) { int64_t scratchpad_size = oneapi::mkl::lapack::unmtr_scratchpad_size>(device_queue->val, convert(side), convert(uplo), convert(trans), m, n, lda, ldc); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZunmtr_scratchpad_size(syclQueue_t device_queue, onemklSide side, onemklUplo uplo, onemklTranspose trans, int64_t m, int64_t n, int64_t lda, int64_t ldc) { int64_t scratchpad_size = oneapi::mkl::lapack::unmtr_scratchpad_size>(device_queue->val, convert(side), convert(uplo), convert(trans), m, n, lda, ldc); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSgeinv_batch_scratchpad_size(syclQueue_t device_queue, int64_t* n, int64_t* lda, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::geinv_batch_scratchpad_size(device_queue->val, n, lda, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDgeinv_batch_scratchpad_size(syclQueue_t device_queue, int64_t* n, int64_t* lda, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::geinv_batch_scratchpad_size(device_queue->val, n, lda, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCgeinv_batch_scratchpad_size(syclQueue_t device_queue, int64_t* n, int64_t* lda, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::geinv_batch_scratchpad_size>(device_queue->val, n, lda, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZgeinv_batch_scratchpad_size(syclQueue_t device_queue, int64_t* n, int64_t* lda, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::geinv_batch_scratchpad_size>(device_queue->val, n, lda, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSgels_batch_scratchpad_size(syclQueue_t device_queue, onemklTranspose* trans, int64_t* m, int64_t* n, int64_t* nrhs, int64_t* lda, int64_t* ldb, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::gels_batch_scratchpad_size(device_queue->val, convert(trans, group_count), m, n, nrhs, lda, ldb, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDgels_batch_scratchpad_size(syclQueue_t device_queue, onemklTranspose* trans, int64_t* m, int64_t* n, int64_t* nrhs, int64_t* lda, int64_t* ldb, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::gels_batch_scratchpad_size(device_queue->val, convert(trans, group_count), m, n, nrhs, lda, ldb, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCgels_batch_scratchpad_size(syclQueue_t device_queue, onemklTranspose* trans, int64_t* m, int64_t* n, int64_t* nrhs, int64_t* lda, int64_t* ldb, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::gels_batch_scratchpad_size>(device_queue->val, convert(trans, group_count), m, n, nrhs, lda, ldb, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZgels_batch_scratchpad_size(syclQueue_t device_queue, onemklTranspose* trans, int64_t* m, int64_t* n, int64_t* nrhs, int64_t* lda, int64_t* ldb, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::gels_batch_scratchpad_size>(device_queue->val, convert(trans, group_count), m, n, nrhs, lda, ldb, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSgels_batch_strided_scratchpad_size(syclQueue_t device_queue, onemklTranspose trans, int64_t m, int64_t n, int64_t nrhs, int64_t lda, int64_t stride_a, int64_t ldb, int64_t stride_b, int64_t batch_size) { int64_t scratchpad_size = oneapi::mkl::lapack::gels_batch_scratchpad_size(device_queue->val, convert(trans), m, n, nrhs, lda, stride_a, ldb, stride_b, batch_size); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDgels_batch_strided_scratchpad_size(syclQueue_t device_queue, onemklTranspose trans, int64_t m, int64_t n, int64_t nrhs, int64_t lda, int64_t stride_a, int64_t ldb, int64_t stride_b, int64_t batch_size) { int64_t scratchpad_size = oneapi::mkl::lapack::gels_batch_scratchpad_size(device_queue->val, convert(trans), m, n, nrhs, lda, stride_a, ldb, stride_b, batch_size); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCgels_batch_strided_scratchpad_size(syclQueue_t device_queue, onemklTranspose trans, int64_t m, int64_t n, int64_t nrhs, int64_t lda, int64_t stride_a, int64_t ldb, int64_t stride_b, int64_t batch_size) { int64_t scratchpad_size = oneapi::mkl::lapack::gels_batch_scratchpad_size>(device_queue->val, convert(trans), m, n, nrhs, lda, stride_a, ldb, stride_b, batch_size); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZgels_batch_strided_scratchpad_size(syclQueue_t device_queue, onemklTranspose trans, int64_t m, int64_t n, int64_t nrhs, int64_t lda, int64_t stride_a, int64_t ldb, int64_t stride_b, int64_t batch_size) { int64_t scratchpad_size = oneapi::mkl::lapack::gels_batch_scratchpad_size>(device_queue->val, convert(trans), m, n, nrhs, lda, stride_a, ldb, stride_b, batch_size); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSgeqrf_batch_scratchpad_size(syclQueue_t device_queue, int64_t* m, int64_t* n, int64_t* lda, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::geqrf_batch_scratchpad_size(device_queue->val, m, n, lda, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDgeqrf_batch_scratchpad_size(syclQueue_t device_queue, int64_t* m, int64_t* n, int64_t* lda, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::geqrf_batch_scratchpad_size(device_queue->val, m, n, lda, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCgeqrf_batch_scratchpad_size(syclQueue_t device_queue, int64_t* m, int64_t* n, int64_t* lda, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::geqrf_batch_scratchpad_size>(device_queue->val, m, n, lda, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZgeqrf_batch_scratchpad_size(syclQueue_t device_queue, int64_t* m, int64_t* n, int64_t* lda, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::geqrf_batch_scratchpad_size>(device_queue->val, m, n, lda, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSgeqrf_batch_strided_scratchpad_size(syclQueue_t device_queue, int64_t m, int64_t n, int64_t lda, int64_t stride_a, int64_t stride_tau, int64_t batch_size) { int64_t scratchpad_size = oneapi::mkl::lapack::geqrf_batch_scratchpad_size(device_queue->val, m, n, lda, stride_a, stride_tau, batch_size); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDgeqrf_batch_strided_scratchpad_size(syclQueue_t device_queue, int64_t m, int64_t n, int64_t lda, int64_t stride_a, int64_t stride_tau, int64_t batch_size) { int64_t scratchpad_size = oneapi::mkl::lapack::geqrf_batch_scratchpad_size(device_queue->val, m, n, lda, stride_a, stride_tau, batch_size); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCgeqrf_batch_strided_scratchpad_size(syclQueue_t device_queue, int64_t m, int64_t n, int64_t lda, int64_t stride_a, int64_t stride_tau, int64_t batch_size) { int64_t scratchpad_size = oneapi::mkl::lapack::geqrf_batch_scratchpad_size>(device_queue->val, m, n, lda, stride_a, stride_tau, batch_size); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZgeqrf_batch_strided_scratchpad_size(syclQueue_t device_queue, int64_t m, int64_t n, int64_t lda, int64_t stride_a, int64_t stride_tau, int64_t batch_size) { int64_t scratchpad_size = oneapi::mkl::lapack::geqrf_batch_scratchpad_size>(device_queue->val, m, n, lda, stride_a, stride_tau, batch_size); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSgesvda_batch_strided_scratchpad_size(syclQueue_t device_queue, int64_t m, int64_t n, int64_t lda, int64_t stride_a, int64_t stride_s, int64_t ldu, int64_t stride_u, int64_t ldvt, int64_t stride_vt, int64_t batch_size) { int64_t scratchpad_size = oneapi::mkl::lapack::gesvda_batch_scratchpad_size(device_queue->val, m, n, lda, stride_a, stride_s, ldu, stride_u, ldvt, stride_vt, batch_size); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDgesvda_batch_strided_scratchpad_size(syclQueue_t device_queue, int64_t m, int64_t n, int64_t lda, int64_t stride_a, int64_t stride_s, int64_t ldu, int64_t stride_u, int64_t ldvt, int64_t stride_vt, int64_t batch_size) { int64_t scratchpad_size = oneapi::mkl::lapack::gesvda_batch_scratchpad_size(device_queue->val, m, n, lda, stride_a, stride_s, ldu, stride_u, ldvt, stride_vt, batch_size); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCgesvda_batch_strided_scratchpad_size(syclQueue_t device_queue, int64_t m, int64_t n, int64_t lda, int64_t stride_a, int64_t stride_s, int64_t ldu, int64_t stride_u, int64_t ldvt, int64_t stride_vt, int64_t batch_size) { int64_t scratchpad_size = oneapi::mkl::lapack::gesvda_batch_scratchpad_size>(device_queue->val, m, n, lda, stride_a, stride_s, ldu, stride_u, ldvt, stride_vt, batch_size); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZgesvda_batch_strided_scratchpad_size(syclQueue_t device_queue, int64_t m, int64_t n, int64_t lda, int64_t stride_a, int64_t stride_s, int64_t ldu, int64_t stride_u, int64_t ldvt, int64_t stride_vt, int64_t batch_size) { int64_t scratchpad_size = oneapi::mkl::lapack::gesvda_batch_scratchpad_size>(device_queue->val, m, n, lda, stride_a, stride_s, ldu, stride_u, ldvt, stride_vt, batch_size); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSgetrf_batch_strided_scratchpad_size(syclQueue_t device_queue, int64_t m, int64_t n, int64_t lda, int64_t stride_a, int64_t stride_ipiv, int64_t batch_size) { int64_t scratchpad_size = oneapi::mkl::lapack::getrf_batch_scratchpad_size(device_queue->val, m, n, lda, stride_a, stride_ipiv, batch_size); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDgetrf_batch_strided_scratchpad_size(syclQueue_t device_queue, int64_t m, int64_t n, int64_t lda, int64_t stride_a, int64_t stride_ipiv, int64_t batch_size) { int64_t scratchpad_size = oneapi::mkl::lapack::getrf_batch_scratchpad_size(device_queue->val, m, n, lda, stride_a, stride_ipiv, batch_size); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCgetrf_batch_strided_scratchpad_size(syclQueue_t device_queue, int64_t m, int64_t n, int64_t lda, int64_t stride_a, int64_t stride_ipiv, int64_t batch_size) { int64_t scratchpad_size = oneapi::mkl::lapack::getrf_batch_scratchpad_size>(device_queue->val, m, n, lda, stride_a, stride_ipiv, batch_size); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZgetrf_batch_strided_scratchpad_size(syclQueue_t device_queue, int64_t m, int64_t n, int64_t lda, int64_t stride_a, int64_t stride_ipiv, int64_t batch_size) { int64_t scratchpad_size = oneapi::mkl::lapack::getrf_batch_scratchpad_size>(device_queue->val, m, n, lda, stride_a, stride_ipiv, batch_size); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSgetrf_batch_scratchpad_size(syclQueue_t device_queue, int64_t* m, int64_t* n, int64_t* lda, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::getrf_batch_scratchpad_size(device_queue->val, m, n, lda, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDgetrf_batch_scratchpad_size(syclQueue_t device_queue, int64_t* m, int64_t* n, int64_t* lda, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::getrf_batch_scratchpad_size(device_queue->val, m, n, lda, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCgetrf_batch_scratchpad_size(syclQueue_t device_queue, int64_t* m, int64_t* n, int64_t* lda, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::getrf_batch_scratchpad_size>(device_queue->val, m, n, lda, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZgetrf_batch_scratchpad_size(syclQueue_t device_queue, int64_t* m, int64_t* n, int64_t* lda, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::getrf_batch_scratchpad_size>(device_queue->val, m, n, lda, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSgetrfnp_batch_strided_scratchpad_size(syclQueue_t device_queue, int64_t m, int64_t n, int64_t lda, int64_t stride_a, int64_t batch_size) { int64_t scratchpad_size = oneapi::mkl::lapack::getrfnp_batch_scratchpad_size(device_queue->val, m, n, lda, stride_a, batch_size); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDgetrfnp_batch_strided_scratchpad_size(syclQueue_t device_queue, int64_t m, int64_t n, int64_t lda, int64_t stride_a, int64_t batch_size) { int64_t scratchpad_size = oneapi::mkl::lapack::getrfnp_batch_scratchpad_size(device_queue->val, m, n, lda, stride_a, batch_size); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCgetrfnp_batch_strided_scratchpad_size(syclQueue_t device_queue, int64_t m, int64_t n, int64_t lda, int64_t stride_a, int64_t batch_size) { int64_t scratchpad_size = oneapi::mkl::lapack::getrfnp_batch_scratchpad_size>(device_queue->val, m, n, lda, stride_a, batch_size); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZgetrfnp_batch_strided_scratchpad_size(syclQueue_t device_queue, int64_t m, int64_t n, int64_t lda, int64_t stride_a, int64_t batch_size) { int64_t scratchpad_size = oneapi::mkl::lapack::getrfnp_batch_scratchpad_size>(device_queue->val, m, n, lda, stride_a, batch_size); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSgetrfnp_batch_scratchpad_size(syclQueue_t device_queue, int64_t* m, int64_t* n, int64_t* lda, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::getrfnp_batch_scratchpad_size(device_queue->val, m, n, lda, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDgetrfnp_batch_scratchpad_size(syclQueue_t device_queue, int64_t* m, int64_t* n, int64_t* lda, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::getrfnp_batch_scratchpad_size(device_queue->val, m, n, lda, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCgetrfnp_batch_scratchpad_size(syclQueue_t device_queue, int64_t* m, int64_t* n, int64_t* lda, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::getrfnp_batch_scratchpad_size>(device_queue->val, m, n, lda, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZgetrfnp_batch_scratchpad_size(syclQueue_t device_queue, int64_t* m, int64_t* n, int64_t* lda, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::getrfnp_batch_scratchpad_size>(device_queue->val, m, n, lda, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSgetri_batch_scratchpad_size(syclQueue_t device_queue, int64_t* n, int64_t* lda, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::getri_batch_scratchpad_size(device_queue->val, n, lda, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDgetri_batch_scratchpad_size(syclQueue_t device_queue, int64_t* n, int64_t* lda, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::getri_batch_scratchpad_size(device_queue->val, n, lda, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCgetri_batch_scratchpad_size(syclQueue_t device_queue, int64_t* n, int64_t* lda, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::getri_batch_scratchpad_size>(device_queue->val, n, lda, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZgetri_batch_scratchpad_size(syclQueue_t device_queue, int64_t* n, int64_t* lda, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::getri_batch_scratchpad_size>(device_queue->val, n, lda, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSgetri_batch_strided_scratchpad_size(syclQueue_t device_queue, int64_t n, int64_t lda, int64_t stride_a, int64_t stride_ipiv, int64_t batch_size) { int64_t scratchpad_size = oneapi::mkl::lapack::getri_batch_scratchpad_size(device_queue->val, n, lda, stride_a, stride_ipiv, batch_size); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDgetri_batch_strided_scratchpad_size(syclQueue_t device_queue, int64_t n, int64_t lda, int64_t stride_a, int64_t stride_ipiv, int64_t batch_size) { int64_t scratchpad_size = oneapi::mkl::lapack::getri_batch_scratchpad_size(device_queue->val, n, lda, stride_a, stride_ipiv, batch_size); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCgetri_batch_strided_scratchpad_size(syclQueue_t device_queue, int64_t n, int64_t lda, int64_t stride_a, int64_t stride_ipiv, int64_t batch_size) { int64_t scratchpad_size = oneapi::mkl::lapack::getri_batch_scratchpad_size>(device_queue->val, n, lda, stride_a, stride_ipiv, batch_size); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZgetri_batch_strided_scratchpad_size(syclQueue_t device_queue, int64_t n, int64_t lda, int64_t stride_a, int64_t stride_ipiv, int64_t batch_size) { int64_t scratchpad_size = oneapi::mkl::lapack::getri_batch_scratchpad_size>(device_queue->val, n, lda, stride_a, stride_ipiv, batch_size); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSgetrs_batch_scratchpad_size(syclQueue_t device_queue, onemklTranspose* trans, int64_t* n, int64_t* nrhs, int64_t* lda, int64_t* ldb, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::getrs_batch_scratchpad_size(device_queue->val, convert(trans, group_count), n, nrhs, lda, ldb, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDgetrs_batch_scratchpad_size(syclQueue_t device_queue, onemklTranspose* trans, int64_t* n, int64_t* nrhs, int64_t* lda, int64_t* ldb, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::getrs_batch_scratchpad_size(device_queue->val, convert(trans, group_count), n, nrhs, lda, ldb, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCgetrs_batch_scratchpad_size(syclQueue_t device_queue, onemklTranspose* trans, int64_t* n, int64_t* nrhs, int64_t* lda, int64_t* ldb, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::getrs_batch_scratchpad_size>(device_queue->val, convert(trans, group_count), n, nrhs, lda, ldb, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZgetrs_batch_scratchpad_size(syclQueue_t device_queue, onemklTranspose* trans, int64_t* n, int64_t* nrhs, int64_t* lda, int64_t* ldb, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::getrs_batch_scratchpad_size>(device_queue->val, convert(trans, group_count), n, nrhs, lda, ldb, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSgetrs_batch_strided_scratchpad_size(syclQueue_t device_queue, onemklTranspose trans, int64_t n, int64_t nrhs, int64_t lda, int64_t stride_a, int64_t stride_ipiv, int64_t ldb, int64_t stride_b, int64_t batch_size) { int64_t scratchpad_size = oneapi::mkl::lapack::getrs_batch_scratchpad_size(device_queue->val, convert(trans), n, nrhs, lda, stride_a, stride_ipiv, ldb, stride_b, batch_size); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDgetrs_batch_strided_scratchpad_size(syclQueue_t device_queue, onemklTranspose trans, int64_t n, int64_t nrhs, int64_t lda, int64_t stride_a, int64_t stride_ipiv, int64_t ldb, int64_t stride_b, int64_t batch_size) { int64_t scratchpad_size = oneapi::mkl::lapack::getrs_batch_scratchpad_size(device_queue->val, convert(trans), n, nrhs, lda, stride_a, stride_ipiv, ldb, stride_b, batch_size); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCgetrs_batch_strided_scratchpad_size(syclQueue_t device_queue, onemklTranspose trans, int64_t n, int64_t nrhs, int64_t lda, int64_t stride_a, int64_t stride_ipiv, int64_t ldb, int64_t stride_b, int64_t batch_size) { int64_t scratchpad_size = oneapi::mkl::lapack::getrs_batch_scratchpad_size>(device_queue->val, convert(trans), n, nrhs, lda, stride_a, stride_ipiv, ldb, stride_b, batch_size); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZgetrs_batch_strided_scratchpad_size(syclQueue_t device_queue, onemklTranspose trans, int64_t n, int64_t nrhs, int64_t lda, int64_t stride_a, int64_t stride_ipiv, int64_t ldb, int64_t stride_b, int64_t batch_size) { int64_t scratchpad_size = oneapi::mkl::lapack::getrs_batch_scratchpad_size>(device_queue->val, convert(trans), n, nrhs, lda, stride_a, stride_ipiv, ldb, stride_b, batch_size); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSgetrsnp_batch_strided_scratchpad_size(syclQueue_t device_queue, onemklTranspose trans, int64_t n, int64_t nrhs, int64_t lda, int64_t stride_a, int64_t ldb, int64_t stride_b, int64_t batch_size) { int64_t scratchpad_size = oneapi::mkl::lapack::getrsnp_batch_scratchpad_size(device_queue->val, convert(trans), n, nrhs, lda, stride_a, ldb, stride_b, batch_size); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDgetrsnp_batch_strided_scratchpad_size(syclQueue_t device_queue, onemklTranspose trans, int64_t n, int64_t nrhs, int64_t lda, int64_t stride_a, int64_t ldb, int64_t stride_b, int64_t batch_size) { int64_t scratchpad_size = oneapi::mkl::lapack::getrsnp_batch_scratchpad_size(device_queue->val, convert(trans), n, nrhs, lda, stride_a, ldb, stride_b, batch_size); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCgetrsnp_batch_strided_scratchpad_size(syclQueue_t device_queue, onemklTranspose trans, int64_t n, int64_t nrhs, int64_t lda, int64_t stride_a, int64_t ldb, int64_t stride_b, int64_t batch_size) { int64_t scratchpad_size = oneapi::mkl::lapack::getrsnp_batch_scratchpad_size>(device_queue->val, convert(trans), n, nrhs, lda, stride_a, ldb, stride_b, batch_size); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZgetrsnp_batch_strided_scratchpad_size(syclQueue_t device_queue, onemklTranspose trans, int64_t n, int64_t nrhs, int64_t lda, int64_t stride_a, int64_t ldb, int64_t stride_b, int64_t batch_size) { int64_t scratchpad_size = oneapi::mkl::lapack::getrsnp_batch_scratchpad_size>(device_queue->val, convert(trans), n, nrhs, lda, stride_a, ldb, stride_b, batch_size); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSorgqr_batch_scratchpad_size(syclQueue_t device_queue, int64_t* m, int64_t* n, int64_t* k, int64_t* lda, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::orgqr_batch_scratchpad_size(device_queue->val, m, n, k, lda, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDorgqr_batch_scratchpad_size(syclQueue_t device_queue, int64_t* m, int64_t* n, int64_t* k, int64_t* lda, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::orgqr_batch_scratchpad_size(device_queue->val, m, n, k, lda, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSorgqr_batch_strided_scratchpad_size(syclQueue_t device_queue, int64_t m, int64_t n, int64_t k, int64_t lda, int64_t stride_a, int64_t stride_tau, int64_t batch_size) { int64_t scratchpad_size = oneapi::mkl::lapack::orgqr_batch_scratchpad_size(device_queue->val, m, n, k, lda, stride_a, stride_tau, batch_size); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDorgqr_batch_strided_scratchpad_size(syclQueue_t device_queue, int64_t m, int64_t n, int64_t k, int64_t lda, int64_t stride_a, int64_t stride_tau, int64_t batch_size) { int64_t scratchpad_size = oneapi::mkl::lapack::orgqr_batch_scratchpad_size(device_queue->val, m, n, k, lda, stride_a, stride_tau, batch_size); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSormqr_batch_scratchpad_size(syclQueue_t device_queue, onemklSide* side, onemklTranspose* trans, int64_t* m, int64_t* n, int64_t* k, int64_t* lda, int64_t* ldc, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::ormqr_batch_scratchpad_size(device_queue->val, convert(side, group_count), convert(trans, group_count), m, n, k, lda, ldc, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDormqr_batch_scratchpad_size(syclQueue_t device_queue, onemklSide* side, onemklTranspose* trans, int64_t* m, int64_t* n, int64_t* k, int64_t* lda, int64_t* ldc, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::ormqr_batch_scratchpad_size(device_queue->val, convert(side, group_count), convert(trans, group_count), m, n, k, lda, ldc, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSpotrf_batch_scratchpad_size(syclQueue_t device_queue, onemklUplo* uplo, int64_t* n, int64_t* lda, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::potrf_batch_scratchpad_size(device_queue->val, convert(uplo, group_count), n, lda, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDpotrf_batch_scratchpad_size(syclQueue_t device_queue, onemklUplo* uplo, int64_t* n, int64_t* lda, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::potrf_batch_scratchpad_size(device_queue->val, convert(uplo, group_count), n, lda, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCpotrf_batch_scratchpad_size(syclQueue_t device_queue, onemklUplo* uplo, int64_t* n, int64_t* lda, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::potrf_batch_scratchpad_size>(device_queue->val, convert(uplo, group_count), n, lda, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZpotrf_batch_scratchpad_size(syclQueue_t device_queue, onemklUplo* uplo, int64_t* n, int64_t* lda, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::potrf_batch_scratchpad_size>(device_queue->val, convert(uplo, group_count), n, lda, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSpotrf_batch_strided_scratchpad_size(syclQueue_t device_queue, onemklUplo uplo, int64_t n, int64_t lda, int64_t stride_a, int64_t batch_size) { int64_t scratchpad_size = oneapi::mkl::lapack::potrf_batch_scratchpad_size(device_queue->val, convert(uplo), n, lda, stride_a, batch_size); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDpotrf_batch_strided_scratchpad_size(syclQueue_t device_queue, onemklUplo uplo, int64_t n, int64_t lda, int64_t stride_a, int64_t batch_size) { int64_t scratchpad_size = oneapi::mkl::lapack::potrf_batch_scratchpad_size(device_queue->val, convert(uplo), n, lda, stride_a, batch_size); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCpotrf_batch_strided_scratchpad_size(syclQueue_t device_queue, onemklUplo uplo, int64_t n, int64_t lda, int64_t stride_a, int64_t batch_size) { int64_t scratchpad_size = oneapi::mkl::lapack::potrf_batch_scratchpad_size>(device_queue->val, convert(uplo), n, lda, stride_a, batch_size); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZpotrf_batch_strided_scratchpad_size(syclQueue_t device_queue, onemklUplo uplo, int64_t n, int64_t lda, int64_t stride_a, int64_t batch_size) { int64_t scratchpad_size = oneapi::mkl::lapack::potrf_batch_scratchpad_size>(device_queue->val, convert(uplo), n, lda, stride_a, batch_size); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSpotrs_batch_scratchpad_size(syclQueue_t device_queue, onemklUplo* uplo, int64_t* n, int64_t* nrhs, int64_t* lda, int64_t* ldb, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::potrs_batch_scratchpad_size(device_queue->val, convert(uplo, group_count), n, nrhs, lda, ldb, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDpotrs_batch_scratchpad_size(syclQueue_t device_queue, onemklUplo* uplo, int64_t* n, int64_t* nrhs, int64_t* lda, int64_t* ldb, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::potrs_batch_scratchpad_size(device_queue->val, convert(uplo, group_count), n, nrhs, lda, ldb, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCpotrs_batch_scratchpad_size(syclQueue_t device_queue, onemklUplo* uplo, int64_t* n, int64_t* nrhs, int64_t* lda, int64_t* ldb, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::potrs_batch_scratchpad_size>(device_queue->val, convert(uplo, group_count), n, nrhs, lda, ldb, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZpotrs_batch_scratchpad_size(syclQueue_t device_queue, onemklUplo* uplo, int64_t* n, int64_t* nrhs, int64_t* lda, int64_t* ldb, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::potrs_batch_scratchpad_size>(device_queue->val, convert(uplo, group_count), n, nrhs, lda, ldb, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklSpotrs_batch_strided_scratchpad_size(syclQueue_t device_queue, onemklUplo uplo, int64_t n, int64_t nrhs, int64_t lda, int64_t stride_a, int64_t ldb, int64_t stride_b, int64_t batch_size) { int64_t scratchpad_size = oneapi::mkl::lapack::potrs_batch_scratchpad_size(device_queue->val, convert(uplo), n, nrhs, lda, stride_a, ldb, stride_b, batch_size); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDpotrs_batch_strided_scratchpad_size(syclQueue_t device_queue, onemklUplo uplo, int64_t n, int64_t nrhs, int64_t lda, int64_t stride_a, int64_t ldb, int64_t stride_b, int64_t batch_size) { int64_t scratchpad_size = oneapi::mkl::lapack::potrs_batch_scratchpad_size(device_queue->val, convert(uplo), n, nrhs, lda, stride_a, ldb, stride_b, batch_size); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCpotrs_batch_strided_scratchpad_size(syclQueue_t device_queue, onemklUplo uplo, int64_t n, int64_t nrhs, int64_t lda, int64_t stride_a, int64_t ldb, int64_t stride_b, int64_t batch_size) { int64_t scratchpad_size = oneapi::mkl::lapack::potrs_batch_scratchpad_size>(device_queue->val, convert(uplo), n, nrhs, lda, stride_a, ldb, stride_b, batch_size); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZpotrs_batch_strided_scratchpad_size(syclQueue_t device_queue, onemklUplo uplo, int64_t n, int64_t nrhs, int64_t lda, int64_t stride_a, int64_t ldb, int64_t stride_b, int64_t batch_size) { int64_t scratchpad_size = oneapi::mkl::lapack::potrs_batch_scratchpad_size>(device_queue->val, convert(uplo), n, nrhs, lda, stride_a, ldb, stride_b, batch_size); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklStrtrs_batch_scratchpad_size(syclQueue_t device_queue, onemklUplo* uplo, onemklTranspose* trans, onemklDiag* diag, int64_t* n, int64_t* nrhs, int64_t* lda, int64_t* ldb, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::trtrs_batch_scratchpad_size(device_queue->val, convert(uplo, group_count), convert(trans, group_count), convert(diag, group_count), n, nrhs, lda, ldb, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklDtrtrs_batch_scratchpad_size(syclQueue_t device_queue, onemklUplo* uplo, onemklTranspose* trans, onemklDiag* diag, int64_t* n, int64_t* nrhs, int64_t* lda, int64_t* ldb, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::trtrs_batch_scratchpad_size(device_queue->val, convert(uplo, group_count), convert(trans, group_count), convert(diag, group_count), n, nrhs, lda, ldb, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCtrtrs_batch_scratchpad_size(syclQueue_t device_queue, onemklUplo* uplo, onemklTranspose* trans, onemklDiag* diag, int64_t* n, int64_t* nrhs, int64_t* lda, int64_t* ldb, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::trtrs_batch_scratchpad_size>(device_queue->val, convert(uplo, group_count), convert(trans, group_count), convert(diag, group_count), n, nrhs, lda, ldb, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZtrtrs_batch_scratchpad_size(syclQueue_t device_queue, onemklUplo* uplo, onemklTranspose* trans, onemklDiag* diag, int64_t* n, int64_t* nrhs, int64_t* lda, int64_t* ldb, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::trtrs_batch_scratchpad_size>(device_queue->val, convert(uplo, group_count), convert(trans, group_count), convert(diag, group_count), n, nrhs, lda, ldb, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCungqr_batch_scratchpad_size(syclQueue_t device_queue, int64_t* m, int64_t* n, int64_t* k, int64_t* lda, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::ungqr_batch_scratchpad_size>(device_queue->val, m, n, k, lda, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZungqr_batch_scratchpad_size(syclQueue_t device_queue, int64_t* m, int64_t* n, int64_t* k, int64_t* lda, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::ungqr_batch_scratchpad_size>(device_queue->val, m, n, k, lda, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCungqr_batch_strided_scratchpad_size(syclQueue_t device_queue, int64_t m, int64_t n, int64_t k, int64_t lda, int64_t stride_a, int64_t stride_tau, int64_t batch_size) { int64_t scratchpad_size = oneapi::mkl::lapack::ungqr_batch_scratchpad_size>(device_queue->val, m, n, k, lda, stride_a, stride_tau, batch_size); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZungqr_batch_strided_scratchpad_size(syclQueue_t device_queue, int64_t m, int64_t n, int64_t k, int64_t lda, int64_t stride_a, int64_t stride_tau, int64_t batch_size) { int64_t scratchpad_size = oneapi::mkl::lapack::ungqr_batch_scratchpad_size>(device_queue->val, m, n, k, lda, stride_a, stride_tau, batch_size); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklCunmqr_batch_scratchpad_size(syclQueue_t device_queue, onemklSide* side, onemklTranspose* trans, int64_t* m, int64_t* n, int64_t* k, int64_t* lda, int64_t* ldc, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::unmqr_batch_scratchpad_size>(device_queue->val, convert(side, group_count), convert(trans, group_count), m, n, k, lda, ldc, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } extern "C" int64_t onemklZunmqr_batch_scratchpad_size(syclQueue_t device_queue, onemklSide* side, onemklTranspose* trans, int64_t* m, int64_t* n, int64_t* k, int64_t* lda, int64_t* ldc, int64_t group_count, int64_t* group_sizes) { int64_t scratchpad_size = oneapi::mkl::lapack::unmqr_batch_scratchpad_size>(device_queue->val, convert(side, group_count), convert(trans, group_count), m, n, k, lda, ldc, group_count, group_sizes); - device_queue->val.wait_and_throw(); return scratchpad_size; } diff --git a/deps/src/sycl.cpp b/deps/src/sycl.cpp index ae060da21..02b072480 100644 --- a/deps/src/sycl.cpp +++ b/deps/src/sycl.cpp @@ -61,13 +61,32 @@ extern "C" int syclQueueCreate(syclQueue_t *obj, syclContext_t context, auto sycl_ownership = keep_ownership ? sycl::ext::oneapi::level_zero::ownership::keep : sycl::ext::oneapi::level_zero::ownership::transfer; + // oneMKL calls are submitted without dependencies, so they must execute in order auto sycl_queue_input = sycl::backend_input_t{queue, device->val, sycl_ownership}; + sycl::queue>{queue, device->val, sycl_ownership, + {sycl::property::queue::in_order()}}; + + // the wrappers don't wait for the queue, so record asynchronous errors for + // syclQueueWait and syclQueueCheck to report, instead of having the default + // handler terminate the process + auto errors = std::make_shared(); + auto handler = [errors](sycl::exception_list exceptions) { + std::lock_guard guard(errors->lock); + for (auto &e : exceptions) { + try { + std::rethrow_exception(e); + } catch (const std::exception &ex) { + errors->messages.push_back(ex.what()); + } catch (...) { + errors->messages.push_back("unknown exception"); + } + } + }; auto sycl_queue = sycl::make_queue( - sycl_queue_input, context->val); - *obj = new syclQueue_st({sycl_queue}); + sycl_queue_input, context->val, handler); + *obj = new syclQueue_st({sycl_queue, errors}); return 0; } @@ -76,9 +95,50 @@ extern "C" int syclQueueDestroy(syclQueue_t obj) { return 0; } +static int pending_errors(syclQueue_t obj) { + std::lock_guard guard(obj->errors->lock); + return obj->errors->messages.size(); +} + +// wait for all work on the queue, returning the number of asynchronous errors that +// have not been taken yet extern "C" int syclQueueWait(syclQueue_t obj) { - obj->val.wait(); - return 0; + try { + obj->val.wait(); + obj->val.throw_asynchronous(); + } catch (const std::exception &e) { + std::lock_guard guard(obj->errors->lock); + obj->errors->messages.push_back(e.what()); + } + return pending_errors(obj); +} + +// like syclQueueWait, but without waiting +extern "C" int syclQueueCheck(syclQueue_t obj) { + try { + obj->val.throw_asynchronous(); + } catch (const std::exception &e) { + std::lock_guard guard(obj->errors->lock); + obj->errors->messages.push_back(e.what()); + } + return pending_errors(obj); +} + +// take the oldest asynchronous error, copying its message into `buf` (truncated and +// NUL-terminated); returns the length of the full message, or -1 without errors +extern "C" int64_t syclQueueTakeError(syclQueue_t obj, char *buf, size_t len) { + std::lock_guard guard(obj->errors->lock); + auto &messages = obj->errors->messages; + if (messages.empty()) + return -1; + std::string message = messages.front(); + messages.erase(messages.begin()); + if (len > 0) { + size_t n = std::min(len - 1, message.size()); + message.copy(buf, n); + buf[n] = '\0'; + } + return message.size(); } extern "C" int syclEventCreate(syclEvent_t *obj, syclContext_t context, diff --git a/deps/src/sycl.h b/deps/src/sycl.h index 4c8cf2e4d..cc0dc4e94 100644 --- a/deps/src/sycl.h +++ b/deps/src/sycl.h @@ -1,6 +1,7 @@ #pragma once #include +#include #include @@ -27,6 +28,8 @@ int syclQueueCreate(syclQueue_t *obj, syclContext_t context, syclDevice_t device ze_command_queue_handle_t queue, int keep_ownership); int syclQueueDestroy(syclQueue_t obj); int syclQueueWait(syclQueue_t obj); +int syclQueueCheck(syclQueue_t obj); +int64_t syclQueueTakeError(syclQueue_t obj, char *buf, size_t len); typedef struct syclEvent_st *syclEvent_t; int syclEventCreate(syclEvent_t *obj, syclContext_t context, diff --git a/deps/src/sycl.hpp b/deps/src/sycl.hpp index 8f5e24786..d55b7734e 100644 --- a/deps/src/sycl.hpp +++ b/deps/src/sycl.hpp @@ -4,6 +4,11 @@ #include +#include +#include +#include +#include + struct syclPlatform_st { sycl::platform val; }; @@ -16,8 +21,15 @@ struct syclContext_st { sycl::context val; }; +// asynchronous errors reported to a queue's handler, until they are taken +struct syclAsyncErrors { + std::mutex lock; + std::vector messages; +}; + struct syclQueue_st { sycl::queue val; + std::shared_ptr errors; }; struct syclEvent_st { diff --git a/docs/src/api/context.md b/docs/src/api/context.md index 5207a75a3..fbc9298e8 100644 --- a/docs/src/api/context.md +++ b/docs/src/api/context.md @@ -81,7 +81,8 @@ Block the host thread until all operations on the global stream for the current and device have completed: both the immediate command list and, if one has been created, the companion command queue. `synchronize(stream::oneStream)` does the same for an explicit stream. `synchronize()` also submits and waits for the work of tasks that -finished without synchronizing, and reports exceptions their kernels threw. +finished without synchronizing, and reports exceptions their kernels threw and errors +oneMKL reported asynchronously. ### Command batching diff --git a/docs/src/onemkl.md b/docs/src/onemkl.md index c98e826f5..517614a63 100644 --- a/docs/src/onemkl.md +++ b/docs/src/onemkl.md @@ -19,6 +19,13 @@ C = A * B X = A \ B ``` +Like kernels, most dense oneMKL calls return as soon as their work is submitted, and later +operations wait for it as needed. Calls that produce a value on the host wait for it: `dot`, +`norm` and the factorizations whose `info` `cholesky`, `lu` and `bunchkaufman` check. The +sparse and FFT functions also wait. An error that oneMKL reports after a call returned is +thrown as a `SYCLError` by the task's next oneMKL call, or by the next operation that waits +for the call's work, such as `synchronize()` or copying its result to the host. + ## Sparse Linear Algebra oneAPI.jl supports sparse matrix operations via oneMKL's sparse BLAS functionality. These integrate with Julia's `SparseArrays` standard library. diff --git a/lib/mkl/fft.jl b/lib/mkl/fft.jl index 5454320f4..799d6e4e4 100644 --- a/lib/mkl/fft.jl +++ b/lib/mkl/fft.jl @@ -611,10 +611,19 @@ _rawptr(a::oneAPI.oneArray{T}) where T = reinterpret(Ptr{Cvoid}, pointer(a)) # NOTE: plans capture their SYCL queue at construction and thus bypass `sycl_queue` — # the usual Julia → MKL ordering boundary — at execution time, so every _exec! method -# must run `mkl_boundary!` itself before handing work to oneMKL. +# must run `_boundary!` itself before handing work to oneMKL. A plan used by another task +# than the one that created it submits to another queue than this task's, so that also +# waits for this task's oneMKL work, whose calls return without waiting for it, as does +# oneMKL work this task submitted to another device (see `sycl_queue`). +function _boundary!(p) + s = oneAPI.global_stream(oneAPI.context(), oneAPI.device()) + local_queue = (Base.@atomic s.sycl) === p.handle.queue + (local_queue && (Base.@atomic s.mkl_foreign) === nothing) || oneAPI.mkl_wait!(s) + oneAPI.mkl_boundary!(s) +end function _exec!(p::cMKLFFTPlan{T, K, true}, X::oneAPI.oneArray{T}) where {T, K} - oneAPI.mkl_boundary!() + _boundary!(p) compute = K == MKLFFT_FORWARD ? onemklDftComputeForward : onemklDftComputeBackward for t in 0:(p.nloop - 1) off = t * p.loopstride * sizeof(T) @@ -623,7 +632,7 @@ function _exec!(p::cMKLFFTPlan{T, K, true}, X::oneAPI.oneArray{T}) where {T, K} return X end function _exec!(p::cMKLFFTPlan{T,K,false}, X::oneAPI.oneArray{T}, Y::oneAPI.oneArray{T}) where {T,K} - oneAPI.mkl_boundary!() + _boundary!(p) compute = K == MKLFFT_FORWARD ? onemklDftComputeForwardOutOfPlace : onemklDftComputeBackwardOutOfPlace for t in 0:(p.nloop - 1) off = t * p.loopstride * sizeof(T) @@ -634,12 +643,12 @@ end # Real forward function _exec!(p::rMKLFFTPlan{T,MKLFFT_FORWARD,false}, X::oneAPI.oneArray{T}, Y::oneAPI.oneArray{Complex{T}}) where T - oneAPI.mkl_boundary!() + _boundary!(p) st = onemklDftComputeForwardOutOfPlace(p.handle, _rawptr(X), _rawptr(Y)); st==0 || error("rfft failed ($st)"); Y end # Real inverse (complex -> real) function _exec!(p::rMKLFFTPlan{T,MKLFFT_INVERSE,false}, X::oneAPI.oneArray{T}, Y::oneAPI.oneArray{R}) where {R,T<:Complex{R}} - oneAPI.mkl_boundary!() + _boundary!(p) st = onemklDftComputeBackwardOutOfPlace(p.handle, _rawptr(X), _rawptr(Y)); st==0 || error("brfft failed ($st)"); Y end diff --git a/lib/mkl/utils.jl b/lib/mkl/utils.jl index 033f328d9..c5b1d76a8 100644 --- a/lib/mkl/utils.jl +++ b/lib/mkl/utils.jl @@ -111,9 +111,10 @@ end # Allocate a one-element buffer for a scalar oneMKL output (nrm2, dot, asum, iamax, # iamin). These are written by the device but consumed on the host, so we place them in # host USM: oneMKL writes straight into host-visible memory and we read the value with a -# plain load, instead of allocating a device buffer and copying it back. The C wrappers -# synchronize the queue before returning, so the result is readable as soon as the -# `ccall` does. +# plain load, instead of allocating a device buffer and copying it back. Reading the +# result waits for the oneMKL call: the wrappers whose bindings pass it as a `ZePtr` +# record the task's stream as its user, and those passing it as a host pointer (as a +# `RefOrZeRef`) wait for the queue before returning. function scalar_result(::Type{T}) where {T} res = oneArray{T, 1, oneL0.HostBuffer}(undef, 1) res[1] = zero(T) diff --git a/lib/support/Support.jl b/lib/support/Support.jl index 5fe9fc352..05bcad9d7 100644 --- a/lib/support/Support.jl +++ b/lib/support/Support.jl @@ -31,6 +31,11 @@ end # load for a symbol that only the rebuilt binary exports and turn the crash into a clear error. const _sparse_abi_ok = Ref(false) +# Likewise, only a support library whose oneMKL wrappers return without waiting reports +# asynchronous errors (`syclQueueCheck`, `syclQueueTakeError`). Older ones wait for every +# call, and leave nothing to report. +const _async_errors_ok = Ref(false) + function _check_sparse_abi() _sparse_abi_ok[] && return error( @@ -56,6 +61,8 @@ function __init__() if handle !== nothing _sparse_abi_ok[] = Libdl.dlsym(handle, :onemklSsparse_set_csc_data; throw_error = false) !== nothing + _async_errors_ok[] = + Libdl.dlsym(handle, :syclQueueTakeError; throw_error = false) !== nothing end end diff --git a/lib/support/liboneapi_support.jl b/lib/support/liboneapi_support.jl index e1b7327f8..7d06bfc46 100644 --- a/lib/support/liboneapi_support.jl +++ b/lib/support/liboneapi_support.jl @@ -62,6 +62,15 @@ function syclQueueWait(obj) @ccall liboneapi_support.syclQueueWait(obj::syclQueue_t)::Cint end +function syclQueueCheck(obj) + @ccall liboneapi_support.syclQueueCheck(obj::syclQueue_t)::Cint +end + +function syclQueueTakeError(obj, buf, len) + @ccall liboneapi_support.syclQueueTakeError(obj::syclQueue_t, buf::Ptr{Cchar}, + len::Csize_t)::Int64 +end + mutable struct syclEvent_st end const syclEvent_t = Ptr{syclEvent_st} diff --git a/lib/sycl/SYCL.jl b/lib/sycl/SYCL.jl index 4c6cbddff..02b6e34ba 100644 --- a/lib/sycl/SYCL.jl +++ b/lib/sycl/SYCL.jl @@ -6,7 +6,7 @@ using ..oneL0 using ..Support -export syclPlatform, syclDevice, syclContext, syclQueue, syclEvent +export syclPlatform, syclDevice, syclContext, syclQueue, syclEvent, SYCLError mutable struct syclPlatform handle::syclPlatform_t @@ -79,6 +79,41 @@ end Base.unsafe_convert(::Type{syclQueue_t}, queue::syclQueue) = queue.handle +""" + SYCLError + +An asynchronous error reported by a SYCL queue, e.g. by oneMKL work that failed after the +call that submitted it returned. +""" +struct SYCLError <: Exception + msg::String +end + +Base.showerror(io::IO, err::SYCLError) = print(io, "SYCLError: ", err.msg) + +# collect the asynchronous errors a queue reported, of which there are `n` +function take_errors(queue::syclQueue, n::Integer) + n == 0 && return nothing + msgs = String[] + buf = Vector{UInt8}(undef, 1024) + while syclQueueTakeError(queue, buf, length(buf)) >= 0 + push!(msgs, GC.@preserve buf unsafe_string(pointer(buf))) + end + # another task may have taken them in the meantime + isempty(msgs) && return nothing + return SYCLError(join(msgs, "\n")) +end + +# wait for the work on a queue, returning a `SYCLError` if it reported errors +wait_errors(queue::syclQueue) = take_errors(queue, syclQueueWait(queue)) + +# wait for the work on a queue, leaving its errors to be reported by `wait_errors` +wait_quietly(queue::syclQueue) = (syclQueueWait(queue); nothing) + +# return a `SYCLError` if the queue reported errors, without waiting for it +check_errors(queue::syclQueue) = + Support._async_errors_ok[] ? take_errors(queue, syclQueueCheck(queue)) : nothing + mutable struct syclEvent handle::syclEvent_t ctx::syclContext diff --git a/src/context.jl b/src/context.jl index e42056b52..316d6490c 100644 --- a/src/context.jl +++ b/src/context.jl @@ -290,7 +290,12 @@ mutable struct oneStream # atomic because other tasks read it when waiting for work on memory this stream owns Base.@atomic queue::Union{Nothing, ZeCommandQueue} + # the SYCL queue wrapping `queue`, which oneMKL work is submitted to (a `syclQueue`) + Base.@atomic sycl::Any mkl_dirty::Bool + # a stream for another device that this task submitted oneMKL work to, on memory + # recorded as used by this stream (see `sycl_queue`) + Base.@atomic mkl_foreign::Union{Nothing, oneStream} # high-water mark of per-thread spill (bytes) among kernels submitted to this # stream, maintained by the scratch hedge (see src/compiler/execution.jl) scratch_hwm::Int @@ -327,7 +332,7 @@ function create_stream(ctx::ZeContext, dev::ZeDevice, slot = allocate_report_slot(ctx, dev, list) s = oneStream(ctx, dev, list, ReentrantLock(), batching, nothing, Batch[], Batch[], 0, nothing, true, nothing, DataRef[], - Batch[], nothing, nothing, false, 0, priority, slot, + Batch[], nothing, nothing, nothing, false, nothing, 0, priority, slot, Base.IdSet{ZeKernel}(), nothing) finalizer(release_report_slot, s) return register_stream!(ctx, dev, s) @@ -646,6 +651,9 @@ function synchronize_all_streams(ctx::ZeContext, dev::Union{ZeDevice, Nothing}) stream.immediate.handle == C_NULL || oneL0.synchronize(stream.immediate) q = Base.@atomic stream.queue (q === nothing || q.handle == C_NULL) || oneL0.synchronize(q) + # errors are left for the stream's task to report, as this can be a finalizer + sq = Base.@atomic stream.sycl + sq === nothing || SYCL.wait_quietly(sq) end # retire drained streams of dead tasks, allowing their list and queue to be # finalized (the finalizers synchronize once more before destroying, in case @@ -705,9 +713,10 @@ function synchronize_stream!(s::oneStream; blocking::Bool=false) catch end sync(s.immediate) - q = Base.@atomic s.queue - if q !== nothing - sync(q) + mkl_err = wait_mkl(s; blocking) + # another task's stream can have submitted oneMKL work since, which only that task's + # next submission may then wait for + if get(task_local_storage(), (:oneStream, s.ctx, s.dev), nothing) === s s.mkl_dirty = false end err = @lock s.lock begin @@ -715,7 +724,24 @@ function synchronize_stream!(s::oneStream; blocking::Bool=false) s.error = nothing err end - return err + return something(err, mkl_err, Some(nothing)) +end + +# wait for the oneMKL work on a stream's companion queue, returning a `SYCLError` for the +# asynchronous errors it reported. waiting for the command queue first lets other tasks +# run in the meantime; the SYCL queue is waited for to collect the errors. +function wait_mkl(s::oneStream; blocking::Bool=false, foreign::Bool=true) + err = nothing + f = Base.@atomic s.mkl_foreign + if foreign && f !== nothing + err = wait_mkl(f; blocking, foreign=false) + end + q = Base.@atomic s.queue + q === nothing && return err + blocking ? oneL0.synchronize(q) : oneL0.nonblocking_synchronize(q) + sq = Base.@atomic s.sycl + sq === nothing && return err + return something(err, SYCL.wait_errors(sq), Some(nothing)) end function oneL0.synchronize(; blocking::Bool=false) @@ -749,9 +775,9 @@ end # creation the flag does not force). @inline function mkl_wait!(s::oneStream) if s.mkl_dirty - q = Base.@atomic s.queue - q === nothing || oneL0.synchronize(q) + err = wait_mkl(s; blocking=true) s.mkl_dirty = false + err === nothing || throw(err) end return end @@ -826,13 +852,41 @@ end # Hands out the task's SYCL queue (wrapping the stream's companion command queue) for # an imminent oneMKL call, which is why this is also the Julia → MKL ordering boundary: # `mkl_boundary!` drains the immediate command list on EVERY access, so device work the -# wrappers prepared beforehand is complete before oneMKL work is enqueued. +# wrappers prepared beforehand is complete before oneMKL work is enqueued. The wrappers +# return without waiting for their work, so this also reports the asynchronous errors that +# earlier calls reported since. function sycl_queue(queue) s = global_stream(queue.context, queue.device) + # the call's memory records the selected device's stream as its user (see + # `unsafe_convert(::Type{ZePtr}, ::oneArray)`). when the call is submitted to another + # device's stream, the selected one tracks that stream in `mkl_foreign`, so that waiting + # for it also waits for the call. only one stream is tracked, and calls on one stream + # aren't ordered with those on another, so switching streams first waits for the + # oneMKL work submitted to the other. + cur = queue.device == device() ? s : global_stream(queue.context, device()) + prev = Base.@atomic cur.mkl_foreign + if cur !== s + if prev !== s + err = wait_mkl(cur) + err === nothing || throw(err) + end + mkl_boundary!(cur) + Base.@atomic cur.mkl_foreign = s + elseif prev !== nothing + err = wait_mkl(prev; foreign=false) + Base.@atomic cur.mkl_foreign = nothing + err === nothing || throw(err) + end mkl_boundary!(s) - get!(task_local_storage(), (:SYCLQueue, queue.context, queue.device)) do - syclQueue(sycl_context(queue.context, queue.device), - sycl_device(queue.device), - stream_queue(s)) + q = Base.@atomic s.sycl + if q === nothing + q = syclQueue(sycl_context(queue.context, queue.device), + sycl_device(queue.device), + stream_queue(s)) + Base.@atomic s.sycl = q + else + err = SYCL.check_errors(q) + err === nothing || throw(err) end + return q end diff --git a/src/memory.jl b/src/memory.jl index ab3d6994c..0f998696d 100644 --- a/src/memory.jl +++ b/src/memory.jl @@ -93,8 +93,8 @@ function drain(s::oneStream; orphan::Bool=false) flush_batch!(s) end oneL0.nonblocking_synchronize(s.immediate) - q = Base.@atomic s.queue - q === nothing || oneL0.nonblocking_synchronize(q) + mkl_err = wait_mkl(s) + mkl_err === nothing || throw(mkl_err) err = @lock s.lock begin # a task that launched in the meantime reports what's left itself orphan && !orphaned(s) && return diff --git a/src/oneAPIKernels.jl b/src/oneAPIKernels.jl index 2e7ae8244..83f72cf62 100644 --- a/src/oneAPIKernels.jl +++ b/src/oneAPIKernels.jl @@ -465,10 +465,6 @@ function KI.priority!(::oneAPIBackend, prio::Symbol) new_stream = oneAPI.create_stream(ctx, dev, priority_enum) task_local_storage((:oneStream, ctx, dev), new_stream) - # the cached SYCL queue wraps the old stream's companion queue; drop it so the next - # oneMKL call recreates it against the new stream (the old one was just drained) - delete!(task_local_storage(), (:SYCLQueue, ctx, dev)) - return nothing end diff --git a/test/fft.jl b/test/fft.jl index b72710ffa..7d3c2d815 100644 --- a/test/fft.jl +++ b/test/fft.jl @@ -165,6 +165,24 @@ end cmp(Z, abs.(fft(hX .* 2f0))) end +@testset "plan used by another task" begin + # the plan executes on the queue of the task that created it, so it has to wait for + # the oneMKL work of the task using it. keep that busy with large products first. + X = gpu(rand(ComplexF32, 256)) + hX = Array(X) + p = AbstractFFTs.plan_fft(X) + Y = fetch(Threads.@spawn begin + big = oneAPI.rand(Float32, 4096, 4096) + big_out = similar(big) + for _ in 1:8 + oneAPI.oneMKL.gemm!('N', 'N', 1f0, big, big, 0f0, big_out) + end + oneAPI.oneMKL.scal!(length(X), 2f0 + 0im, X) + Array(p * X) + end) + @test Y ≈ fft(hX .* 2) rtol=MYRTOL +end + @testset "descriptor lifetime" begin FFTm = oneAPI.oneMKL.FFT X = rand(ComplexF32, 64, 8) diff --git a/test/onemkl.jl b/test/onemkl.jl index bf4110a65..deb077aed 100644 --- a/test/onemkl.jl +++ b/test/onemkl.jl @@ -2170,4 +2170,67 @@ end @test d ≈ sum(Array(z)) rtol=1e-3 end +@testset "asynchronous execution" begin + # most wrappers return once oneMKL has submitted its work. keep the companion queue + # busy with large products, and check whether a call returns before they complete. + T = Float32 + queue = oneAPI.global_queue(oneAPI.context(), oneAPI.device()) + big = oneAPI.rand(T, 4096, 4096) + big_out = similar(big) + function returns_early(f) + f(); oneAPI.synchronize() # compile and allocate first + for _ in 1:8 + mul!(big_out, big, big) + end + f() + early = !Base.isdone(queue) + oneAPI.synchronize() + return early + end + + n = 32 + A = oneArray(rand(T, n, n)) + B = oneArray(rand(T, n, n)) + C = oneArray(rand(T, n, n)) + L = oneArray(Matrix(LowerTriangular(rand(T, n, n))) + n*I) + S = oneArray(Matrix(Hermitian(rand(T, n, n))) + n*I) + F = cholesky(Hermitian(S, :L)).factors + x = oneArray(rand(T, n)) + @test returns_early(() -> oneMKL.gemm!('N', 'N', one(T), A, B, zero(T), C)) + @test returns_early(() -> mul!(C, A, B)) + @test returns_early(() -> oneMKL.syrk!('L', 'N', one(T), A, zero(T), C)) + @test returns_early(() -> oneMKL.trsm!('L', 'L', 'N', 'N', one(T), L, B)) + @test returns_early(() -> oneMKL.potrs!('L', F, B)) + # host results, and the factorizations returning `info`, wait + @test !returns_early(() -> dot(x, x)) + @test !returns_early(() -> oneMKL._potrf!('L', S)) + + # chains of dependent calls, read back from this task and from another one + hA = Array(A) + function chain() + X, Y = copy(A), similar(A) + for _ in 1:20 + oneMKL.gemm!('N', 'N', T(1/n), X, A, zero(T), Y) + X, Y = Y, X + end + return X + end + hX = copy(hA) + for _ in 1:20 + hX = T(1/n) * hX * hA + end + @test Array(chain()) ≈ hX rtol=1e-3 + X = chain() + @test fetch(Threads.@spawn Array(X)) ≈ hX rtol=1e-3 + + # failures are reported when the factorization runs after queued work + D = Matrix{T}(I, n, n) + D[3, 3] = -1 + for _ in 1:4 + mul!(big_out, big, big) + end + @test_throws PosDefException cholesky(Hermitian(oneArray(D), :L)) + @test !issuccess(cholesky(Hermitian(oneArray(D), :L); check = false)) +end + end # oneMKL tests