Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit e63b15c

Browse files
There is no REQUIRES: aspect-fp64, use runtime check
1 parent 354180c commit e63b15c

File tree

6 files changed

+24
-19
lines changed

6 files changed

+24
-19
lines changed

SYCL/ESIMD/regression/Inputs/dgetrf.hpp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -298,11 +298,10 @@ ESIMD_INLINE void dgetrfnp_esimd(int64_t m, int64_t n, double *a, int64_t lda,
298298
#endif // defined(USE_REF)
299299
}
300300

301-
void dgetrfnp_batch_strided_c(int64_t m, int64_t n, double *a, int64_t lda,
302-
int64_t stride_a, int64_t *ipiv,
301+
void dgetrfnp_batch_strided_c(queue &queue, int64_t m, int64_t n, double *a,
302+
int64_t lda, int64_t stride_a, int64_t *ipiv,
303303
int64_t stride_ipiv, int64_t batch,
304304
int64_t *info) {
305-
queue queue((gpu_selector()));
306305
auto device = queue.get_device();
307306
auto context = queue.get_context();
308307
int status;
@@ -446,6 +445,11 @@ void dgetrfnp_batch_strided_c(int64_t m, int64_t n, double *a, int64_t lda,
446445
int64_t *info);
447446

448447
int main(int argc, char *argv[]) {
448+
queue queue((gpu_selector()));
449+
450+
if (!queue.get_device().has(aspect::fp64))
451+
return 0;
452+
449453
int exit_status = 0;
450454
int64_t m = 64, n = 64, lda = 64;
451455
int64_t stride_a = lda * n, stride_ipiv = n;
@@ -472,8 +476,8 @@ int main(int argc, char *argv[]) {
472476
}
473477

474478
/* Run the tested function */
475-
dgetrfnp_batch_strided_c(m, n, a, lda, stride_a, ipiv, stride_ipiv, batch,
476-
info);
479+
dgetrfnp_batch_strided_c(queue, m, n, a, lda, stride_a, ipiv, stride_ipiv,
480+
batch, info);
477481

478482
/* Check that the computation completed successfully */
479483
exit_status += dgetrfnp_batch_strided_check(m, n, a_copy, a, lda, stride_a,

SYCL/ESIMD/regression/dgetrf.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
// REQUIRES: gpu, aspect-fp64
9+
// REQUIRES: gpu
1010
// UNSUPPORTED: cuda || hip
1111
// RUN: %clangxx -fsycl %s -I%S/.. -o %t.out
1212
// RUN: %GPU_RUN_PLACEHOLDER %t.out 3 2 1

SYCL/ESIMD/regression/dgetrf_8x8.cpp

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
8-
// REQUIRES: gpu, aspect-fp64
8+
// REQUIRES: gpu
99
// UNSUPPORTED: cuda || hip
1010
// RUN: %clangxx -fsycl %s -I%S/.. -o %t.out
1111
// RUN: %GPU_RUN_PLACEHOLDER %t.out 1
@@ -125,11 +125,10 @@ ESIMD_INLINE void dgetrfnp_esimd_8x8(double *a, int64_t lda, int64_t *ipiv,
125125
dgetrfnp_left_step<8, 8, 0>(a, lda, info);
126126
}
127127

128-
void dgetrfnp_batch_strided_c(int64_t m, int64_t n, double *a, int64_t lda,
129-
int64_t stride_a, int64_t *ipiv,
128+
void dgetrfnp_batch_strided_c(queue &queue, int64_t m, int64_t n, double *a,
129+
int64_t lda, int64_t stride_a, int64_t *ipiv,
130130
int64_t stride_ipiv, int64_t batch,
131131
int64_t *info) {
132-
queue queue((gpu_selector()));
133132
auto device = queue.get_device();
134133
auto context = queue.get_context();
135134
int status;
@@ -267,12 +266,12 @@ static int dgetrfnp_batch_strided_check(int64_t m, int64_t n, double *a_in,
267266
return fail;
268267
}
269268

270-
void dgetrfnp_batch_strided_c(int64_t m, int64_t n, double *a, int64_t lda,
271-
int64_t stride_a, int64_t *ipiv,
272-
int64_t stride_ipiv, int64_t batch,
273-
int64_t *info);
274-
275269
int main(int argc, char *argv[]) {
270+
queue queue((gpu_selector()));
271+
272+
if (!queue.get_device().has(aspect::fp64))
273+
return 0;
274+
276275
int exit_status = 0;
277276
constexpr int64_t m = 8, n = 8, lda = 8;
278277
int64_t stride_a = lda * n, stride_ipiv = n;
@@ -299,8 +298,8 @@ int main(int argc, char *argv[]) {
299298
}
300299

301300
/* Run the tested function */
302-
dgetrfnp_batch_strided_c(m, n, a, lda, stride_a, ipiv, stride_ipiv, batch,
303-
info);
301+
dgetrfnp_batch_strided_c(queue, m, n, a, lda, stride_a, ipiv, stride_ipiv,
302+
batch, info);
304303

305304
/* Check that the computation completed successfully */
306305
exit_status += dgetrfnp_batch_strided_check(m, n, a_copy, a, lda, stride_a,

SYCL/ESIMD/regression/dgetrf_ref.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
// REQUIRES: gpu, aspect-fp64
9+
// REQUIRES: gpu
1010
// UNSUPPORTED: cuda || hip
1111
// RUN: %clangxx -fsycl -DUSE_REF %s -I%S/.. -o %t.ref.out
1212
// RUN: %GPU_RUN_PLACEHOLDER %t.ref.out 3 2 1

SYCL/ESIMD/spec_const/Inputs/spec-const-2020-common.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ int main(int argc, char **argv) {
3939
queue q(esimd_test::ESIMDSelector{}, esimd_test::createExceptionHandler());
4040

4141
auto dev = q.get_device();
42+
if (std::is_same_v<spec_const_t, double> && !dev.has(aspect::fp64))
43+
return 0;
4244
std::cout << "Running on " << dev.get_info<info::device::name>() << "\n";
4345

4446
std::vector<container_t> etalon = {DEF_VAL, REDEF_VAL};

SYCL/ESIMD/spec_const/spec_const_double.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
8-
// REQUIRES: gpu, aspect-fp64
8+
// REQUIRES: gpu
99
// RUN: %clangxx -fsycl -I%S/.. %s -o %t.out
1010
// RUN: %GPU_RUN_PLACEHOLDER %t.out
1111
// UNSUPPORTED: cuda || hip

0 commit comments

Comments
 (0)