[Mlir-commits] [mlir] [mlir][py] Add NVGPU's `TensorMapDescriptorType` in py bindings (PR #88855)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Apr 16 01:32:32 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {darker}-->
:warning: Python code formatter, darker found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
darker --check --diff -r d06ba376833553f38b5cbc606e479ed7936e5f5b...d0d37b7675b14547be615b47f7a5203b8ac3a035 mlir/python/mlir/dialects/nvgpu.py mlir/test/python/dialects/nvgpu.py
``````````
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- test/python/dialects/nvgpu.py 2024-04-16 08:26:49.000000 +0000
+++ test/python/dialects/nvgpu.py 2024-04-16 08:31:57.545089 +0000
@@ -12,21 +12,25 @@
with InsertionPoint(module.body):
f()
print(module)
return f
+
# CHECK-LABEL: testTypes
@constructAndPrintInModule
def testTypes():
- tensorType = MemRefType.get((128,64), F16Type.get(), memory_space=Attribute.parse("3"))
+ tensorType = MemRefType.get(
+ (128, 64), F16Type.get(), memory_space=Attribute.parse("3")
+ )
# CHECK: !nvgpu.tensormap.descriptor<tensor = memref<128x64xf16, 3>, swizzle = swizzle_128b, l2promo = l2promo_256b, oob = nan, interleave = none>
tma_desc = nvgpu.TensorMapDescriptorType.get(
- tensorType,
- nvgpu.TensorMapSwizzleKind.SWIZZLE_128B,
- nvgpu.TensorMapL2PromoKind.L2PROMO_256B,
- nvgpu.TensorMapOOBKind.OOB_NAN,
- nvgpu.TensorMapInterleaveKind.INTERLEAVE_NONE)
+ tensorType,
+ nvgpu.TensorMapSwizzleKind.SWIZZLE_128B,
+ nvgpu.TensorMapL2PromoKind.L2PROMO_256B,
+ nvgpu.TensorMapOOBKind.OOB_NAN,
+ nvgpu.TensorMapInterleaveKind.INTERLEAVE_NONE,
+ )
print(tma_desc)
# CHECK-LABEL: testSmoke
@constructAndPrintInModule
``````````
</details>
https://github.com/llvm/llvm-project/pull/88855
More information about the Mlir-commits
mailing list