[clang] [llvm] [mlir] [NVPTX] Convert vector function nvvm.annotations to attributes (PR #127736)

2025-02-25 Thread Han-Chung Wang via cfe-commits
hanhanW wrote: > > I think they will become something like: > > ```c++ > > llvmFunc->addFnAttr("nvvm.maxntid", llvm::utostr(workgroupSize[0])); > > llvmFunc->addFnAttr("nvvm.maxntid", llvm::utostr(workgroupSize[1])); > > llvmFunc->addFnAttr("nvvm.maxntid", llvm::utostr(workgroupSize[2])); > > ```

[clang] [llvm] [mlir] [NVPTX] Convert vector function nvvm.annotations to attributes (PR #127736)

2025-02-25 Thread Han-Chung Wang via cfe-commits
hanhanW wrote: Thanks for the heads-up! We do have few cases like: ```cpp setMetadataValueI32("maxntidx", workgroupSize[0]); setMetadataValueI32("maxntidy", workgroupSize[1]); setMetadataValueI32("maxntidz", workgroupSize[2]); https://github.com/llvm/llvm-project/p

[libcxx] [libc] [lld] [clang-tools-extra] [libclc] [lldb] [llvm] [clang] [compiler-rt] [flang] [mlir] [libunwind] [mlir][tensor] Enhance pack/unpack simplification for identity outer_dims_perm cases.

2024-01-10 Thread Han-Chung Wang via cfe-commits
https://github.com/hanhanW closed https://github.com/llvm/llvm-project/pull/77409 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [lldb] [clang-tools-extra] [clang] [libunwind] [libc] [compiler-rt] [flang] [lld] [libclc] [mlir] [libcxx] [mlir][tensor] Enhance pack/unpack simplification for identity outer_dims_perm cases.

2024-01-10 Thread Han-Chung Wang via cfe-commits
https://github.com/hanhanW updated https://github.com/llvm/llvm-project/pull/77409 >From e74b859897cdf1b1effbbd48a4e5376a231f7132 Mon Sep 17 00:00:00 2001 From: hanhanW Date: Mon, 8 Jan 2024 20:17:30 -0800 Subject: [PATCH 1/2] [mlir][tensor] Enhance pack/unpack simplication patterns for identi

[clang] [flang] [clang-tools-extra] [compiler-rt] [libc] [libcxx] [llvm] [mlir] [mlir][Linalg] Support dynamic tiles in `lower_pack` transform (PR #76003)

2024-01-04 Thread Han-Chung Wang via cfe-commits
hanhanW wrote: > I am curious though, what do you mean by more powerful expand_shape op? > Wouldn't that just be exactly reshape? We don't need a more powerful > expand_shape to cover all the cases you mention above. That could be tensor.reshape, but I don't see a scenario about using it. To b

[clang] [compiler-rt] [libc] [flang] [clang-tools-extra] [mlir] [llvm] [libcxx] [mlir][Linalg] Support dynamic tiles in `lower_pack` transform (PR #76003)

2024-01-04 Thread Han-Chung Wang via cfe-commits
hanhanW wrote: I'm -1 on using `tensor.reshape` op. IMO, we should only use tensor.expand/collapse_shape; they work much better with existing transformations. Out of curiosity, what use case do you have in mind? Why do we lower fully dynamic pack op? If it is at high level graph level, we can

[mlir] [clang-tools-extra] [llvm] [clang] [mlir][TilingInterface] Early return cloned ops if tile sizes are zeros. (PR #75410)

2023-12-19 Thread Han-Chung Wang via cfe-commits
https://github.com/hanhanW closed https://github.com/llvm/llvm-project/pull/75410 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] [mlir] [mlir][TilingInterface] Early return cloned ops if tile sizes are zeros. (PR #75410)

2023-12-18 Thread Han-Chung Wang via cfe-commits
https://github.com/hanhanW updated https://github.com/llvm/llvm-project/pull/75410 >From c07f7e1c5c6f8bbc7189e96096004d39a0a1aa3f Mon Sep 17 00:00:00 2001 From: hanhanW Date: Wed, 13 Dec 2023 15:59:48 -0800 Subject: [PATCH 1/3] [mlir][TilingInterface] Early return cloned ops if tile sizes are

[clang] [clang-tools-extra] [llvm] [mlir] [mlir][TilingInterface] Early return cloned ops if tile sizes are zeros. (PR #75410)

2023-12-18 Thread Han-Chung Wang via cfe-commits
@@ -362,14 +362,20 @@ mlir::scf::tileUsingSCFForOp(RewriterBase &rewriter, TilingInterface op, auto clonedOp = cast( cloneOpAndUpdateDestinationArgs(rewriter, op, clonedOpDestination)); - // 5b. Tile the cloned operation. + // 5b. Early return cloned op if tiling is

[llvm] [clang] [clang-tools-extra] [mlir] [mlir][TilingInterface] Early return cloned ops if tile sizes are zeros. (PR #75410)

2023-12-18 Thread Han-Chung Wang via cfe-commits
@@ -362,14 +362,20 @@ mlir::scf::tileUsingSCFForOp(RewriterBase &rewriter, TilingInterface op, auto clonedOp = cast( cloneOpAndUpdateDestinationArgs(rewriter, op, clonedOpDestination)); - // 5b. Tile the cloned operation. + // 5b. Early return cloned op if tiling is

[llvm] [clang] [clang-tools-extra] [mlir] [mlir][TilingInterface] Early return cloned ops if tile sizes are zeros. (PR #75410)

2023-12-18 Thread Han-Chung Wang via cfe-commits
@@ -362,14 +362,20 @@ mlir::scf::tileUsingSCFForOp(RewriterBase &rewriter, TilingInterface op, auto clonedOp = cast( cloneOpAndUpdateDestinationArgs(rewriter, op, clonedOpDestination)); - // 5b. Tile the cloned operation. + // 5b. Early return cloned op if tiling is

[clang] [llvm] [mlir] [clang-tools-extra] [mlir][TilingInterface] Early return cloned ops if tile sizes are zeros. (PR #75410)

2023-12-15 Thread Han-Chung Wang via cfe-commits
https://github.com/hanhanW updated https://github.com/llvm/llvm-project/pull/75410 >From c07f7e1c5c6f8bbc7189e96096004d39a0a1aa3f Mon Sep 17 00:00:00 2001 From: hanhanW Date: Wed, 13 Dec 2023 15:59:48 -0800 Subject: [PATCH 1/2] [mlir][TilingInterface] Early return cloned ops if tile sizes are

[clang-tools-extra] [clang] [mlir] [llvm] [mlir][TilingInterface] Early return cloned ops if tile sizes are zeros. (PR #75410)

2023-12-15 Thread Han-Chung Wang via cfe-commits
@@ -362,14 +362,21 @@ mlir::scf::tileUsingSCFForOp(RewriterBase &rewriter, TilingInterface op, auto clonedOp = cast( cloneOpAndUpdateDestinationArgs(rewriter, op, clonedOpDestination)); - // 5b. Tile the cloned operation. + // 5b. Early return cloned op if tiling is

[clang] Reland "[mlir][arith] Canonicalization patterns for `arith.select` (#67809)" (PR #68941)

2023-10-13 Thread Han-Chung Wang via cfe-commits
https://github.com/hanhanW closed https://github.com/llvm/llvm-project/pull/68941 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland "[mlir][arith] Canonicalization patterns for `arith.select` (#67809)" (PR #68941)

2023-10-13 Thread Han-Chung Wang via cfe-commits
hanhanW wrote: thanks for the review! https://github.com/llvm/llvm-project/pull/68941 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland "[mlir][arith] Canonicalization patterns for `arith.select` (#67809)" (PR #68941)

2023-10-13 Thread Han-Chung Wang via cfe-commits
https://github.com/hanhanW edited https://github.com/llvm/llvm-project/pull/68941 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland "[mlir][arith] Canonicalization patterns for `arith.select` (#67809)" (PR #68941)

2023-10-13 Thread Han-Chung Wang via cfe-commits
@@ -233,6 +233,52 @@ def CmpIExtUI : CPred<"$0.getValue() == arith::CmpIPredicate::eq || " "$0.getValue() == arith::CmpIPredicate::ne">> $pred)]>; +//===--===// +// SelectOp +//==

[clang] Reland "[mlir][arith] Canonicalization patterns for `arith.select` (#67809)" (PR #68941)

2023-10-13 Thread Han-Chung Wang via cfe-commits
https://github.com/hanhanW updated https://github.com/llvm/llvm-project/pull/68941 >From 877111a139b2f01037fdbe7c0cb120a2f4e64562 Mon Sep 17 00:00:00 2001 From: hanhanW Date: Thu, 12 Oct 2023 17:14:29 -0700 Subject: [PATCH 1/2] Reland "[mlir][arith] Canonicalization patterns for `arith.select`