Skip to content

Commit

Permalink
Fix dft/sparse tests also.
Browse files Browse the repository at this point in the history
Signed-off-by: JackAKirk <jack.kirk@codeplay.com>
  • Loading branch information
JackAKirk committed Jul 12, 2024
1 parent fd316ae commit ef4004b
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion tests/unit_tests/dft/include/compute_inplace.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ int DFT_Test<precision, domain>::test_in_place_buffer() {
oneapi::mkl::dft::compute_forward<descriptor_t, FwdInputType>(descriptor, inout_buf);

{
auto acc_host = inout_buf.template get_host_access();
auto acc_host = inout_buf.get_host_access();
auto ptr_host = reinterpret_cast<FwdOutputType*>(acc_host.get_pointer());
for (std::int64_t i = 0; i < batches; i++) {
EXPECT_TRUE(check_equal_strided<domain == oneapi::mkl::dft::domain::REAL>(
Expand Down
8 changes: 4 additions & 4 deletions tests/unit_tests/dft/include/compute_inplace_real_real.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ int DFT_Test<precision, domain>::test_in_place_real_real_buffer() {
inout_im_buf);

{
auto acc_inout_re = inout_re_buf.template get_host_access();
auto acc_inout_im = inout_im_buf.template get_host_access();
auto acc_inout_re = inout_re_buf.get_host_access();
auto acc_inout_im = inout_im_buf.get_host_access();
std::vector<FwdOutputType> output_data(size_total, static_cast<FwdOutputType>(0));
for (std::size_t i = 0; i < output_data.size(); ++i) {
output_data[i] = { acc_inout_re[i], acc_inout_im[i] };
Expand All @@ -136,8 +136,8 @@ int DFT_Test<precision, domain>::test_in_place_real_real_buffer() {
PrecisionType>(descriptor, inout_re_buf, inout_im_buf);

{
auto acc_inout_re = inout_re_buf.template get_host_access();
auto acc_inout_im = inout_im_buf.template get_host_access();
auto acc_inout_re = inout_re_buf.get_host_access();
auto acc_inout_im = inout_im_buf.get_host_access();
std::vector<FwdInputType> output_data(size_total, static_cast<FwdInputType>(0));
for (std::size_t i = 0; i < output_data.size(); ++i) {
output_data[i] = { acc_inout_re[i], acc_inout_im[i] };
Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/dft/include/compute_out_of_place.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ int DFT_Test<precision, domain>::test_out_of_place_buffer() {
descriptor, fwd_buf, bwd_buf);

{
auto acc_bwd = bwd_buf.template get_host_access();
auto acc_bwd = bwd_buf.get_host_access();
auto bwd_ptr = acc_bwd.get_pointer();
for (std::int64_t i = 0; i < batches; i++) {
EXPECT_TRUE(check_equal_strided<domain == oneapi::mkl::dft::domain::REAL>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ int DFT_Test<precision, domain>::test_out_of_place_real_real_buffer() {
descriptor, in_dev_re, in_dev_im, out_dev_re, out_dev_im);

{
auto acc_out_re = out_dev_re.template get_host_access();
auto acc_out_im = out_dev_im.template get_host_access();
auto acc_out_re = out_dev_re.get_host_access();
auto acc_out_im = out_dev_im.get_host_access();
std::vector<FwdOutputType> output_data(size_total, static_cast<FwdOutputType>(0));
for (std::size_t i = 0; i < output_data.size(); ++i) {
output_data[i] = { acc_out_re[i], acc_out_im[i] };
Expand All @@ -143,8 +143,8 @@ int DFT_Test<precision, domain>::test_out_of_place_real_real_buffer() {
descriptor, out_dev_re, out_dev_im, out_back_dev_re, out_back_dev_im);

{
auto acc_back_out_re = out_back_dev_re.template get_host_access();
auto acc_back_out_im = out_back_dev_im.template get_host_access();
auto acc_back_out_re = out_back_dev_re.get_host_access();
auto acc_back_out_im = out_back_dev_im.get_host_access();
std::vector<FwdInputType> output_data(size_total, static_cast<FwdInputType>(0));
for (std::size_t i = 0; i < output_data.size(); ++i) {
output_data[i] = { acc_back_out_re[i], acc_back_out_im[i] };
Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/sparse_blas/source/sparse_gemm_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ int test(sycl::device *dev, intType nrows_A, intType ncols_A, intType ncols_C,
c_ref_host.data());

// Compare the results of reference implementation and DPC++ implementation.
auto c_acc = c_buf.template get_host_access(sycl::read_only);
auto c_acc = c_buf.get_host_access(sycl::read_only);
bool valid = check_equal_vector(c_acc, c_ref_host);

ev_release.wait_and_throw();
Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/sparse_blas/source/sparse_gemv_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ int test(sycl::device *dev, intType nrows, intType ncols, double density_A_matri
y_ref_host.data());

// Compare the results of reference implementation and DPC++ implementation.
auto y_acc = y_buf.template get_host_access(sycl::read_only);
auto y_acc = y_buf.get_host_access(sycl::read_only);
bool valid = check_equal_vector(y_acc, y_ref_host);

ev_release.wait_and_throw();
Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/sparse_blas/source/sparse_trsv_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ int test(sycl::device *dev, intType m, double density_A_matrix, oneapi::mkl::ind
y_ref_host.data());

// Compare the results of reference implementation and DPC++ implementation.
auto y_acc = y_buf.template get_host_access(sycl::read_only);
auto y_acc = y_buf.get_host_access(sycl::read_only);
bool valid = check_equal_vector(y_acc, y_ref_host);

ev_release.wait_and_throw();
Expand Down

0 comments on commit ef4004b

Please sign in to comment.