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
62 lines
2.2 KiB
MLIR
62 lines
2.2 KiB
MLIR
// RUN: mlir-opt -convert-spirv-to-llvm %s | FileCheck %s
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
// spirv.Constant
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// CHECK-LABEL: @bool_constant_scalar
|
|
spirv.func @bool_constant_scalar() "None" {
|
|
// CHECK: llvm.mlir.constant(true) : i1
|
|
%0 = spirv.Constant true
|
|
// CHECK: llvm.mlir.constant(false) : i1
|
|
%1 = spirv.Constant false
|
|
spirv.Return
|
|
}
|
|
|
|
// CHECK-LABEL: @bool_constant_vector
|
|
spirv.func @bool_constant_vector() "None" {
|
|
// CHECK: llvm.mlir.constant(dense<[true, false]> : vector<2xi1>) : vector<2xi1>
|
|
%0 = spirv.Constant dense<[true, false]> : vector<2xi1>
|
|
// CHECK: llvm.mlir.constant(dense<false> : vector<3xi1>) : vector<3xi1>
|
|
%1 = spirv.Constant dense<false> : vector<3xi1>
|
|
spirv.Return
|
|
}
|
|
|
|
// CHECK-LABEL: @integer_constant_scalar
|
|
spirv.func @integer_constant_scalar() "None" {
|
|
// CHECK: llvm.mlir.constant(0 : i8) : i8
|
|
%0 = spirv.Constant 0 : i8
|
|
// CHECK: llvm.mlir.constant(-5 : i64) : i64
|
|
%1 = spirv.Constant -5 : si64
|
|
// CHECK: llvm.mlir.constant(10 : i16) : i16
|
|
%2 = spirv.Constant 10 : ui16
|
|
spirv.Return
|
|
}
|
|
|
|
// CHECK-LABEL: @integer_constant_vector
|
|
spirv.func @integer_constant_vector() "None" {
|
|
// CHECK: llvm.mlir.constant(dense<[2, 3]> : vector<2xi32>) : vector<2xi32>
|
|
%0 = spirv.Constant dense<[2, 3]> : vector<2xi32>
|
|
// CHECK: llvm.mlir.constant(dense<-4> : vector<2xi32>) : vector<2xi32>
|
|
%1 = spirv.Constant dense<-4> : vector<2xsi32>
|
|
// CHECK: llvm.mlir.constant(dense<[2, 3, 4]> : vector<3xi32>) : vector<3xi32>
|
|
%2 = spirv.Constant dense<[2, 3, 4]> : vector<3xui32>
|
|
spirv.Return
|
|
}
|
|
|
|
// CHECK-LABEL: @float_constant_scalar
|
|
spirv.func @float_constant_scalar() "None" {
|
|
// CHECK: llvm.mlir.constant(5.000000e+00 : f16) : f16
|
|
%0 = spirv.Constant 5.000000e+00 : f16
|
|
// CHECK: llvm.mlir.constant(5.000000e+00 : f64) : f64
|
|
%1 = spirv.Constant 5.000000e+00 : f64
|
|
spirv.Return
|
|
}
|
|
|
|
// CHECK-LABEL: @float_constant_vector
|
|
spirv.func @float_constant_vector() "None" {
|
|
// CHECK: llvm.mlir.constant(dense<[2.000000e+00, 3.000000e+00]> : vector<2xf32>) : vector<2xf32>
|
|
%0 = spirv.Constant dense<[2.000000e+00, 3.000000e+00]> : vector<2xf32>
|
|
spirv.Return
|
|
}
|