summaryrefslogtreecommitdiffstats
path: root/mlir/test/Dialect/SPIRV/Serialization/module.mlir
blob: a66116aeb252cc25e6d2013a080ed73814fd954f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// RUN: mlir-translate -test-spirv-roundtrip -split-input-file %s | FileCheck %s

// CHECK:      spv.module "Logical" "GLSL450" {
// CHECK-NEXT:   func @foo() {
// CHECK-NEXT:     spv.Return
// CHECK-NEXT:   }
// CHECK-NEXT: } attributes {major_version = 1 : i32, minor_version = 0 : i32}

spv.module "Logical" "GLSL450" {
  func @foo() -> () {
     spv.Return
  }
}

// -----

spv.module "Logical" "GLSL450" {
} attributes {
  // CHECK: capabilities = ["Shader", "Float16"]
  capabilities = ["Shader", "Float16"]
}

// -----

spv.module "Logical" "GLSL450" {
} attributes {
  // CHECK: extensions = ["SPV_KHR_float_controls", "SPV_KHR_subgroup_vote"]
  extensions = ["SPV_KHR_float_controls", "SPV_KHR_subgroup_vote"]
}

OpenPOWER on IntegriCloud