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
99 lines
4.3 KiB
LLVM
99 lines
4.3 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
|
|
|
|
; ## FP16 abs is not supported by PTX version (PTX < 65).
|
|
; RUN: llc < %s -mcpu=sm_53 -mattr=+ptx60 \
|
|
; RUN: -O0 -disable-post-ra -verify-machineinstrs \
|
|
; RUN: | FileCheck -check-prefix CHECK-NOF16 %s
|
|
; RUN: %if ptxas-sm_53 %{ \
|
|
; RUN: llc < %s -mcpu=sm_53 -mattr=+ptx60 \
|
|
; RUN: -O0 -disable-post-ra -verify-machineinstrs \
|
|
; RUN: | %ptxas-verify -arch=sm_53 \
|
|
; RUN: %}
|
|
|
|
; ## FP16 support explicitly disabled (--nvptx-no-f16-math).
|
|
; RUN: llc < %s -mcpu=sm_53 -mattr=+ptx65 --nvptx-no-f16-math \
|
|
; RUN: -O0 -disable-post-ra -verify-machineinstrs \
|
|
; RUN: | FileCheck -check-prefix CHECK-NOF16 %s
|
|
; RUN: %if ptxas-sm_53 %{ \
|
|
; RUN: llc < %s -mcpu=sm_53 -mattr=+ptx65 --nvptx-no-f16-math \
|
|
; RUN: -O0 -disable-post-ra -verify-machineinstrs \
|
|
; RUN: | %ptxas-verify -arch=sm_53 \
|
|
; RUN: %}
|
|
|
|
; ## FP16 is not supported by hardware (SM < 53).
|
|
; RUN: llc < %s -mcpu=sm_52 -mattr=+ptx65 \
|
|
; RUN: -O0 -disable-post-ra -verify-machineinstrs \
|
|
; RUN: | FileCheck -check-prefix CHECK-NOF16 %s
|
|
; RUN: %if ptxas-sm_52 %{ \
|
|
; RUN: llc < %s -mcpu=sm_52 -mattr=+ptx65 \
|
|
; RUN: -O0 -disable-post-ra -verify-machineinstrs \
|
|
; RUN: | %ptxas-verify -arch=sm_52 \
|
|
; RUN: %}
|
|
|
|
; ## Full FP16 abs support.
|
|
; RUN: llc < %s -mcpu=sm_53 -mattr=+ptx65 \
|
|
; RUN: -O0 -disable-post-ra -verify-machineinstrs \
|
|
; RUN: | FileCheck -check-prefix CHECK-F16-ABS %s
|
|
; RUN: %if ptxas-sm_53 %{ \
|
|
; RUN: llc < %s -mcpu=sm_53 -mattr=+ptx65 \
|
|
; RUN: -O0 -disable-post-ra -verify-machineinstrs \
|
|
; RUN: | %ptxas-verify -arch=sm_53 \
|
|
; RUN: %}
|
|
|
|
target triple = "nvptx64-nvidia-cuda"
|
|
|
|
declare half @llvm.fabs.f16(half %a)
|
|
declare <2 x half> @llvm.fabs.v2f16(<2 x half> %a)
|
|
|
|
define half @test_fabs(half %a) {
|
|
; CHECK-NOF16-LABEL: test_fabs(
|
|
; CHECK-NOF16: {
|
|
; CHECK-NOF16-NEXT: .reg .b16 %rs<3>;
|
|
; CHECK-NOF16-NEXT: .reg .b32 %r<3>;
|
|
; CHECK-NOF16-EMPTY:
|
|
; CHECK-NOF16-NEXT: // %bb.0:
|
|
; CHECK-NOF16-NEXT: ld.param.b16 %rs1, [test_fabs_param_0];
|
|
; CHECK-NOF16-NEXT: cvt.f32.f16 %r1, %rs1;
|
|
; CHECK-NOF16-NEXT: abs.f32 %r2, %r1;
|
|
; CHECK-NOF16-NEXT: cvt.rn.f16.f32 %rs2, %r2;
|
|
; CHECK-NOF16-NEXT: st.param.b16 [func_retval0], %rs2;
|
|
; CHECK-NOF16-NEXT: ret;
|
|
;
|
|
; CHECK-F16-ABS-LABEL: test_fabs(
|
|
; CHECK-F16-ABS: {
|
|
; CHECK-F16-ABS-NEXT: .reg .b16 %rs<3>;
|
|
; CHECK-F16-ABS-EMPTY:
|
|
; CHECK-F16-ABS-NEXT: // %bb.0:
|
|
; CHECK-F16-ABS-NEXT: ld.param.b16 %rs1, [test_fabs_param_0];
|
|
; CHECK-F16-ABS-NEXT: abs.f16 %rs2, %rs1;
|
|
; CHECK-F16-ABS-NEXT: st.param.b16 [func_retval0], %rs2;
|
|
; CHECK-F16-ABS-NEXT: ret;
|
|
%r = call half @llvm.fabs.f16(half %a)
|
|
ret half %r
|
|
}
|
|
|
|
define <2 x half> @test_fabs_2(<2 x half> %a) #0 {
|
|
; CHECK-F16-LABEL: test_fabs_2(
|
|
; CHECK-F16: {
|
|
; CHECK-F16-NEXT: .reg .b32 %r<5>;
|
|
; CHECK-F16-EMPTY:
|
|
; CHECK-F16-NEXT: // %bb.0:
|
|
; CHECK-F16-NEXT: ld.param.b32 %r1, [test_fabs_2_param_0];
|
|
; CHECK-F16-NEXT: and.b32 %r3, %r1, 2147450879;
|
|
; CHECK-F16-NEXT: st.param.b32 [func_retval0], %r3;
|
|
; CHECK-F16-NEXT: ret;
|
|
;
|
|
; CHECK-F16-ABS-LABEL: test_fabs_2(
|
|
; CHECK-F16-ABS: {
|
|
; CHECK-F16-ABS-NEXT: .reg .b32 %r<3>;
|
|
; CHECK-F16-ABS-EMPTY:
|
|
; CHECK-F16-ABS-NEXT: // %bb.0:
|
|
; CHECK-F16-ABS-NEXT: ld.param.b32 %r1, [test_fabs_2_param_0];
|
|
; CHECK-F16-ABS-NEXT: abs.f16x2 %r2, %r1;
|
|
; CHECK-F16-ABS-NEXT: st.param.b32 [func_retval0], %r2;
|
|
; CHECK-F16-ABS-NEXT: ret;
|
|
%r = call <2 x half> @llvm.fabs.v2f16(<2 x half> %a)
|
|
ret <2 x half> %r
|
|
}
|
|
|