xref: /llvm-project/mlir/include/mlir-c/Dialect/NVGPU.h (revision 4f88c2311130791cf69da34b743b1b3ba7584a7b)
1a7d80c50Smax //===-- mlir-c/Dialect/NVGPU.h - C API for NVGPU dialect --*- C -*-===//
2a7d80c50Smax //
3a7d80c50Smax // Part of the LLVM Project, under the Apache License v2.0 with LLVM
4a7d80c50Smax // Exceptions.
5a7d80c50Smax // See https://llvm.org/LICENSE.txt for license information.
6a7d80c50Smax // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7a7d80c50Smax //
8a7d80c50Smax //===----------------------------------------------------------------------===//
9a7d80c50Smax 
10a7d80c50Smax #ifndef MLIR_C_DIALECT_NVGPU_H
11a7d80c50Smax #define MLIR_C_DIALECT_NVGPU_H
12a7d80c50Smax 
13a7d80c50Smax #include "mlir-c/IR.h"
14*4f88c231SGuray Ozen #include "mlir-c/Support.h"
15a7d80c50Smax 
16a7d80c50Smax #ifdef __cplusplus
17a7d80c50Smax extern "C" {
18a7d80c50Smax #endif
19a7d80c50Smax 
20a7d80c50Smax MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(NVGPU, nvgpu);
21a7d80c50Smax 
22*4f88c231SGuray Ozen //===---------------------------------------------------------------------===//
23*4f88c231SGuray Ozen // TensorMapDescriptorType
24*4f88c231SGuray Ozen //===---------------------------------------------------------------------===//
25*4f88c231SGuray Ozen 
26*4f88c231SGuray Ozen MLIR_CAPI_EXPORTED bool mlirTypeIsANVGPUTensorMapDescriptorType(MlirType type);
27*4f88c231SGuray Ozen 
28*4f88c231SGuray Ozen MLIR_CAPI_EXPORTED MlirType mlirNVGPUTensorMapDescriptorTypeGet(
29*4f88c231SGuray Ozen     MlirContext ctx, MlirType tensorMemrefType, int swizzle, int l2promo,
30*4f88c231SGuray Ozen     int oobFill, int interleave);
31*4f88c231SGuray Ozen 
32a7d80c50Smax #ifdef __cplusplus
33a7d80c50Smax }
34a7d80c50Smax #endif
35a7d80c50Smax 
36a7d80c50Smax #endif // MLIR_C_DIALECT_NVGPU_H
37