CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
71 lines
4.0 KiB
C++
71 lines
4.0 KiB
C++
/*
|
|
* Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
#include <hip_test_common.hh>
|
|
|
|
class Dummy {
|
|
public:
|
|
__device__ Dummy() {}
|
|
__device__ ~Dummy() {}
|
|
};
|
|
|
|
#define MISC_UNARY_NEGATIVE_KERNELS(func_name) \
|
|
__global__ void func_name##f_kernel_v1(float* x) { float result = func_name##f(x); } \
|
|
__global__ void func_name##f_kernel_v2(Dummy x) { float result = func_name##f(x); } \
|
|
__global__ void func_name##_kernel_v1(double* x) { double result = func_name(x); } \
|
|
__global__ void func_name##_kernel_v2(Dummy x) { double result = func_name(x); }
|
|
|
|
#define MISC_UNARY_BOOL_RET_NEGATIVE_KERNELS(func_name) \
|
|
__global__ void func_name##_kernel_v1(float* x) { bool result = func_name(x); } \
|
|
__global__ void func_name##_kernel_v2(Dummy x) { bool result = func_name(x); } \
|
|
__global__ void func_name##_kernel_v3(double* x) { bool result = func_name(x); } \
|
|
__global__ void func_name##_kernel_v4(Dummy x) { bool result = func_name(x); }
|
|
|
|
#define MISC_BINARY_NEGATIVE_KERNELS(func_name) \
|
|
__global__ void func_name##f_kernel_v1(float* x, float y) { float result = func_name##f(x, y); } \
|
|
__global__ void func_name##f_kernel_v2(Dummy x, float y) { float result = func_name##f(x, y); } \
|
|
__global__ void func_name##f_kernel_v3(float x, float* y) { float result = func_name##f(x, y); } \
|
|
__global__ void func_name##f_kernel_v4(float x, Dummy y) { float result = func_name##f(x, y); } \
|
|
__global__ void func_name##_kernel_v1(double* x, double y) { double result = func_name(x, y); } \
|
|
__global__ void func_name##_kernel_v2(Dummy x, double y) { double result = func_name(x, y); } \
|
|
__global__ void func_name##_kernel_v3(double x, double* y) { double result = func_name(x, y); } \
|
|
__global__ void func_name##_kernel_v4(double x, Dummy y) { double result = func_name(x, y); }
|
|
|
|
/*Expecting 4 errors*/
|
|
MISC_UNARY_NEGATIVE_KERNELS(fabs)
|
|
|
|
/*Expecting 8 errors per macro invocation - 40 total*/
|
|
MISC_BINARY_NEGATIVE_KERNELS(copysign)
|
|
MISC_BINARY_NEGATIVE_KERNELS(fmax)
|
|
MISC_BINARY_NEGATIVE_KERNELS(fmin)
|
|
MISC_BINARY_NEGATIVE_KERNELS(nextafter)
|
|
MISC_BINARY_NEGATIVE_KERNELS(fma)
|
|
|
|
/*Expecting 4 errors*/
|
|
__global__ void fdividef_kernel_v1(float* x, float y) { float result = fdividef(x, y); }
|
|
__global__ void fdividef_kernel_v2(Dummy x, float y) { float result = fdivide(x); }
|
|
__global__ void fdividef_kernel_v3(float x, float* y) { float result = fdivide(x); }
|
|
__global__ void fdividef_kernel_v4(float x, Dummy y) { float result = fdivide(x); }
|
|
|
|
/*Expecting 4 errors per macro invocation - 16 total*/
|
|
MISC_UNARY_BOOL_RET_NEGATIVE_KERNELS(isfinite)
|
|
MISC_UNARY_BOOL_RET_NEGATIVE_KERNELS(isinf)
|
|
MISC_UNARY_BOOL_RET_NEGATIVE_KERNELS(isnan)
|
|
MISC_UNARY_BOOL_RET_NEGATIVE_KERNELS(signbit)
|
|
|
|
/*Expecting 12 errors*/
|
|
__global__ void fmaf_kernel_v1(float* x, float y, float z) { float result = fmaf(x, y, z); }
|
|
__global__ void fmaf_kernel_v2(Dummy x, float y, float z) { float result = fmaf(x, y, z); }
|
|
__global__ void fmaf_kernel_v3(float x, float* y, float z) { float result = fmaf(x, y, z); }
|
|
__global__ void fmaf_kernel_v4(float x, Dummy y, float z) { float result = fmaf(x, y, z); }
|
|
__global__ void fmaf_kernel_v5(float x, float y, float* z) { float result = fmaf(x, y, z); }
|
|
__global__ void fmaf_kernel_v6(float x, float y, Dummy z) { float result = fmaf(x, y, z); }
|
|
__global__ void fma_kernel_v1(double* x, double y, double z) { double result = fmaf(x, y, z); }
|
|
__global__ void fma_kernel_v2(Dummy x, double y, double z) { double result = fmaf(x, y, z); }
|
|
__global__ void fma_kernel_v3(double x, double* y, double z) { double result = fmaf(x, y, z); }
|
|
__global__ void fma_kernel_v4(double x, Dummy y, double z) { double result = fmaf(x, y, z); }
|
|
__global__ void fma_kernel_v5(double x, double y, double* z) { double result = fmaf(x, y, z); }
|
|
__global__ void fma_kernel_v6(double x, double y, Dummy z) { double result = fmaf(x, y, z); } |