[Mlir-commits] [mlir] [NVGPU] Fix nvdsl examples (PR #156830)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Oct 8 06:01:35 PDT 2025
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 origin/main...HEAD mlir/test/Examples/NVGPU/Ch5.py mlir/test/Examples/NVGPU/tools/nvdsl.py mlir/test/Examples/NVGPU/tools/nvgpucompiler.py
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- tools/nvdsl.py 2025-10-08 11:51:06.000000 +0000
+++ tools/nvdsl.py 2025-10-08 13:01:05.815271 +0000
@@ -82,12 +82,11 @@
txcount_op = const(txcount)
nvgpu.mbarrier_arrive_expect_tx(
self.mbar_group_op, txcount_op, self.id_op, predicate=predicate
)
else:
- nvgpu.mbarrier_arrive(self.mbar_group_op, self.id_op
- )
+ nvgpu.mbarrier_arrive(self.mbar_group_op, self.id_op)
def try_wait(self, phase: bool = False, ticks: int = 10000000):
ticks_op = const(ticks)
phase_op = const(phase, T.bool())
nvgpu.MBarrierTryWaitParityOp(
@@ -141,11 +140,13 @@
self.memref_ty.element_type, self.memref_ty.memory_space
),
device_ptr,
)
self.tma_descriptor = nvgpu.TmaCreateDescriptorOp(
- tma_descriptor_ty, device_unranked_memref, list(map(const, self.tma_box_shape))
+ tma_descriptor_ty,
+ device_unranked_memref,
+ list(map(const, self.tma_box_shape)),
)
return self.tma_descriptor.result
def prefetch(self, predicate=None):
nvgpu.tma_prefetch_descriptor(self.tma_descriptor, predicate=predicate)
``````````
</details>
https://github.com/llvm/llvm-project/pull/156830
More information about the Mlir-commits
mailing list