From bc7c765e58eb9145ddc01f75d158d37cf9e7f325 Mon Sep 17 00:00:00 2001 From: Michael Ferguson Date: Wed, 13 Sep 2023 10:49:19 -0400 Subject: [PATCH 1/2] Add a (?) for a generic formal type in cuBLAS --- Signed-off-by: Michael Ferguson --- test/gpu/interop/cuBLAS/cuBLAS.chpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/gpu/interop/cuBLAS/cuBLAS.chpl b/test/gpu/interop/cuBLAS/cuBLAS.chpl index 3637aa7ef004..22e105869592 100644 --- a/test/gpu/interop/cuBLAS/cuBLAS.chpl +++ b/test/gpu/interop/cuBLAS/cuBLAS.chpl @@ -31,7 +31,7 @@ module cuBLAS { return gpu_ptr; } - proc gpu_to_cpu(dst_ptr: c_ptr(void), src_ptr: DevicePtr, size: c_size_t){ + proc gpu_to_cpu(dst_ptr: c_ptr(void), src_ptr: DevicePtr(?), size: c_size_t){ require "c_cublas.h", "c_cublas.o"; to_cpu(dst_ptr, src_ptr.val, size); } From bb124f27d93050c52687103d0a3344e428856d16 Mon Sep 17 00:00:00 2001 From: Michael Ferguson Date: Wed, 13 Sep 2023 10:49:41 -0400 Subject: [PATCH 2/2] Update LAPACK TestHelpers for recent changes this.complete() -> init this needed (?) on some generic formal types --- Signed-off-by: Michael Ferguson --- test/library/packages/LAPACK/TestHelpers.chpl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/library/packages/LAPACK/TestHelpers.chpl b/test/library/packages/LAPACK/TestHelpers.chpl index 67123780d3f2..12c6ae9feddf 100644 --- a/test/library/packages/LAPACK/TestHelpers.chpl +++ b/test/library/packages/LAPACK/TestHelpers.chpl @@ -75,12 +75,12 @@ module TestHelpers { this.matrix_domain = {1..#rows,1..#columns}; this.epsilon = error; - this.complete(); + init this; this.populateFromArray( input_array, input_row_order ); } - proc init( matrix: borrowed LAPACK_Matrix, type data_type = matrix.data_type ){ + proc init( matrix: borrowed LAPACK_Matrix(?), type data_type = matrix.data_type ){ this.data_type = data_type; this.row_major = matrix.row_major; this.rows = matrix.rows; @@ -88,7 +88,7 @@ module TestHelpers { this.data_domain = matrix.data_domain; this.matrix_domain = matrix.matrix_domain; - this.complete(); + init this; for idx in data_domain do this.data[idx] = matrix.data[idx]; this.epsilon = matrix.epsilon; @@ -190,8 +190,8 @@ module TestHelpers { } // Not using type queries to work around issue #13721 - operator LAPACK_Matrix.*(A: borrowed LAPACK_Matrix, - B: borrowed LAPACK_Matrix): owned LAPACK_Matrix(A.data_type) { + operator LAPACK_Matrix.*(A: borrowed LAPACK_Matrix(?), + B: borrowed LAPACK_Matrix(?)): owned LAPACK_Matrix(A.data_type) { if A.data_type != B.data_type then compilerError("data_type mismatch in *"); @@ -212,8 +212,8 @@ module TestHelpers { return retmatrix; } - operator LAPACK_Matrix.==(A: borrowed LAPACK_Matrix, - B: borrowed LAPACK_Matrix ): bool { + operator LAPACK_Matrix.==(A: borrowed LAPACK_Matrix(?), + B: borrowed LAPACK_Matrix(?) ): bool { if A.data_type != B.data_type then compilerError("data_type mismatch in ==");