MLIR  20.0.0git
GPU.h
Go to the documentation of this file.
1 //===-- mlir-c/Dialect/GPU.h - C API for GPU dialect -------------*- C -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM
4 // Exceptions.
5 // See https://llvm.org/LICENSE.txt for license information.
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //
8 //===---------------------------------------------------------------------===//
9 
10 #ifndef MLIR_C_DIALECT_GPU_H
11 #define MLIR_C_DIALECT_GPU_H
12 
13 #include "mlir-c/IR.h"
14 #include "mlir-c/Support.h"
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
21 
22 //===-------------------------------------------------------------------===//
23 // AsyncTokenType
24 //===-------------------------------------------------------------------===//
25 
27 
28 MLIR_CAPI_EXPORTED MlirType mlirGPUAsyncTokenTypeGet(MlirContext ctx);
29 
30 //===---------------------------------------------------------------------===//
31 // ObjectAttr
32 //===---------------------------------------------------------------------===//
33 
34 MLIR_CAPI_EXPORTED bool mlirAttributeIsAGPUObjectAttr(MlirAttribute attr);
35 
36 MLIR_CAPI_EXPORTED MlirAttribute
37 mlirGPUObjectAttrGet(MlirContext mlirCtx, MlirAttribute target, uint32_t format,
38  MlirStringRef objectStrRef, MlirAttribute mlirObjectProps);
39 
41  MlirContext mlirCtx, MlirAttribute target, uint32_t format,
42  MlirStringRef objectStrRef, MlirAttribute mlirObjectProps,
43  MlirAttribute mlirKernelsAttr);
44 
45 MLIR_CAPI_EXPORTED MlirAttribute
46 mlirGPUObjectAttrGetTarget(MlirAttribute mlirObjectAttr);
47 
48 MLIR_CAPI_EXPORTED uint32_t
49 mlirGPUObjectAttrGetFormat(MlirAttribute mlirObjectAttr);
50 
52 mlirGPUObjectAttrGetObject(MlirAttribute mlirObjectAttr);
53 
55 mlirGPUObjectAttrHasProperties(MlirAttribute mlirObjectAttr);
56 
57 MLIR_CAPI_EXPORTED MlirAttribute
58 mlirGPUObjectAttrGetProperties(MlirAttribute mlirObjectAttr);
59 
61 mlirGPUObjectAttrHasKernels(MlirAttribute mlirObjectAttr);
62 
63 MLIR_CAPI_EXPORTED MlirAttribute
64 mlirGPUObjectAttrGetKernels(MlirAttribute mlirObjectAttr);
65 
66 #ifdef __cplusplus
67 }
68 #endif
69 
70 #include "mlir/Dialect/GPU/Transforms/Passes.capi.h.inc"
71 
72 #endif // MLIR_C_DIALECT_GPU_H
MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(GPU, gpu)
MLIR_CAPI_EXPORTED MlirAttribute mlirGPUObjectAttrGet(MlirContext mlirCtx, MlirAttribute target, uint32_t format, MlirStringRef objectStrRef, MlirAttribute mlirObjectProps)
Definition: GPU.cpp:38
MLIR_CAPI_EXPORTED bool mlirAttributeIsAGPUObjectAttr(MlirAttribute attr)
Definition: GPU.cpp:34
MLIR_CAPI_EXPORTED MlirAttribute mlirGPUObjectAttrGetTarget(MlirAttribute mlirObjectAttr)
Definition: GPU.cpp:70
MLIR_CAPI_EXPORTED MlirAttribute mlirGPUObjectAttrGetProperties(MlirAttribute mlirObjectAttr)
Definition: GPU.cpp:95
MLIR_CAPI_EXPORTED bool mlirGPUObjectAttrHasProperties(MlirAttribute mlirObjectAttr)
Definition: GPU.cpp:89
MLIR_CAPI_EXPORTED MlirAttribute mlirGPUObjectAttrGetKernels(MlirAttribute mlirObjectAttr)
Definition: GPU.cpp:107
MLIR_CAPI_EXPORTED MlirAttribute mlirGPUObjectAttrGetWithKernels(MlirContext mlirCtx, MlirAttribute target, uint32_t format, MlirStringRef objectStrRef, MlirAttribute mlirObjectProps, MlirAttribute mlirKernelsAttr)
Definition: GPU.cpp:51
MLIR_CAPI_EXPORTED bool mlirGPUObjectAttrHasKernels(MlirAttribute mlirObjectAttr)
Definition: GPU.cpp:101
MLIR_CAPI_EXPORTED MlirType mlirGPUAsyncTokenTypeGet(MlirContext ctx)
Definition: GPU.cpp:26
MLIR_CAPI_EXPORTED bool mlirTypeIsAGPUAsyncTokenType(MlirType type)
Definition: GPU.cpp:22
MLIR_CAPI_EXPORTED uint32_t mlirGPUObjectAttrGetFormat(MlirAttribute mlirObjectAttr)
Definition: GPU.cpp:76
MLIR_CAPI_EXPORTED MlirStringRef mlirGPUObjectAttrGetObject(MlirAttribute mlirObjectAttr)
Definition: GPU.cpp:82
#define MLIR_CAPI_EXPORTED
Definition: Support.h:46
A pointer to a sized fragment of a string, not necessarily null-terminated.
Definition: Support.h:73