In D157458#4646407, @arsenm wrote:Post-selection code should not be tolerant of registers without a class. It is unequivocally a bug for a used register to pass selection without a class dead or not
Please use GitHub pull requests for new patches. Phabricator shutdown timeline
- Queries
- All Stories
- Search
- Advanced Search
- Transactions
- Transaction Logs
Feed Advanced Search
Advanced Search
Advanced Search
Mon, Sep 18
Mon, Sep 18
Fri, Sep 15
Fri, Sep 15
Do you think we still need to modify X86FastPreTileConfig?
Wed, Sep 13
Wed, Sep 13
qcolombet accepted D156491: [RA] Split a virtual register in cold blocks if it is not assigned preferred physical register.
Thanks for the clarifications @Carrot
I've added a part about alive registers.
qcolombet added a comment to D86617: [GlobalISel][TableGen] Take first result for multi-output instructions.
Long term I assume we should just have MIR patterns working for ISel, but as long as we rely on DAG patterns I believe this is a good change (we inevitably need to make some tradeoffs in this case anyway), can we land it or are there still some objections?
The peephole optimizer changes look good to me.
+1 on every comments touching on test cases and comments.
Mon, Sep 11
Mon, Sep 11
Tue, Sep 5
Tue, Sep 5
Good catch!
Mon, Sep 4
Mon, Sep 4
BTW, LGTM :D.
Aug 31 2023
Aug 31 2023
Nice clean-up!
Aug 22 2023
Aug 22 2023
qcolombet added inline comments to D157382: [MLIR][NVGPU] Introduction of wgmma.generate.descriptor Op.
Aug 14 2023
Aug 14 2023
Aug 11 2023
Aug 11 2023
Aug 10 2023
Aug 10 2023
Good catch!
qcolombet added inline comments to D157382: [MLIR][NVGPU] Introduction of wgmma.generate.descriptor Op.
qcolombet added inline comments to D157382: [MLIR][NVGPU] Introduction of wgmma.generate.descriptor Op.
qcolombet added inline comments to D157382: [MLIR][NVGPU] Introduction of wgmma.generate.descriptor Op.
qcolombet added inline comments to D157382: [MLIR][NVGPU] Introduction of wgmma.generate.descriptor Op.
qcolombet added a comment to D156345: RegisterCoalescer: Add implicit-def of super register when coalescing SUBREG_TO_REG.
The code is reasonable to me, but I am worried by the asserts not being true in general.
I think we should indeed remove SUBREG_TO_REG in the long run and maybe short term, let's turn the asserts into fatal_errors.
That way if this breaks in the wild we'll get reports of the related errors instead of miscompiles.
Aug 9 2023
Aug 9 2023
qcolombet committed rGbb206cb13122: [NVPTX] Apply global var demotion to private symbols (authored by qcolombet).
[NVPTX] Apply global var demotion to private symbols
qcolombet committed rGf559e73fad5b: [mlir] Support fast-math friendly constants for identity value (authored by qcolombet).
[mlir] Support fast-math friendly constants for identity value
Aug 8 2023
Aug 8 2023
qcolombet added a comment to D156987: [RegScavenger] Remove support for forwards register scavenging.
Yay!
qcolombet added a comment to D156471: [mlir] Support fast-math friendly constants for identity value.
Does this look good to you?
Aug 7 2023
Aug 7 2023
qcolombet added inline comments to D156471: [mlir] Support fast-math friendly constants for identity value.
qcolombet updated the diff for D156471: [mlir] Support fast-math friendly constants for identity value.
- Use ArithFastMathInterface instead of iterating through the attributes
qcolombet accepted D156879: [AggressiveAntiDepBreaker] Tweak the fix for renaming a subregister of a live register.
I'm not super familiar with this code, but that sounds reasonable to me.
qcolombet added inline comments to D156471: [mlir] Support fast-math friendly constants for identity value.
qcolombet updated the diff for D156471: [mlir] Support fast-math friendly constants for identity value.
- Use the fastmath flags attached to arith op when using getIdentityElement
- Add tests catching that behavior
qcolombet added inline comments to D156471: [mlir] Support fast-math friendly constants for identity value.
qcolombet updated the diff for D156471: [mlir] Support fast-math friendly constants for identity value.
- Rebase
- Set default value for getIdentity
- Use markdown instead of \p.
qcolombet added inline comments to D156541: [mlir][NVGPU] WIP - Apply layering changes for e2e NVVM.
qcolombet added inline comments to D156471: [mlir] Support fast-math friendly constants for identity value.
Jul 28 2023
Jul 28 2023
qcolombet added a comment to D156345: RegisterCoalescer: Add implicit-def of super register when coalescing SUBREG_TO_REG.
In D156345#4542646, @arsenm wrote:In D156345#4542127, @qcolombet wrote:Hi @arsenm ,
A maybe more robust temporary fix may be to apply the terminal rule (applyTerminalRule) only on isCopy instructions (right now it is on isCopyLike).
I could be wrong, but I wouldn't be surprised if this is the entry point of the problematic coalesced SUBREG_TO_REGs. And clearly without your fixes, the terminal rule is incorrect on SUBREG_TO_REG.
"UseTerminalRule" is false by default. Swapping the isCopyLike in copyCoalesceInMBB for isCopy induces about 850 test failures
qcolombet added inline comments to D156346: CodeGen: Disable isCopyInstrImpl if there are implicit operands.
qcolombet added a comment to D156471: [mlir] Support fast-math friendly constants for identity value.
Thanks for the link @rengolin !
qcolombet added inline comments to D156346: CodeGen: Disable isCopyInstrImpl if there are implicit operands.
qcolombet added a comment to D156345: RegisterCoalescer: Add implicit-def of super register when coalescing SUBREG_TO_REG.
A maybe more robust temporary fix may be to apply the terminal rule (applyTerminalRule) only on isCopy instructions (right now it is on isCopyLike).
qcolombet added a comment to D156345: RegisterCoalescer: Add implicit-def of super register when coalescing SUBREG_TO_REG.
In my mind, if we have implicit defs on a copy, then we should probably not consider the related instruction as a copy to begin with.
LGTM
qcolombet added a comment to D156345: RegisterCoalescer: Add implicit-def of super register when coalescing SUBREG_TO_REG.
This does not yet fix the regression. The isCopyInstr handling needs to start handling implicit-defs on any instruction.
qcolombet added a comment to D156345: RegisterCoalescer: Add implicit-def of super register when coalescing SUBREG_TO_REG.
The same problem likely exists everywhere trying to do anything with SUBREG_TO_REG. I don't understand how this managed to be broken for so long.
qcolombet updated the diff for D156471: [mlir] Support fast-math friendly constants for identity value.
- Fix Smallest/Largest for maxf/minf respectively.
Jul 27 2023
Jul 27 2023
qcolombet requested review of D156471: [mlir] Support fast-math friendly constants for identity value.
Jul 26 2023
Jul 26 2023
qcolombet added inline comments to D119916: Add a machine function pass to convert binop(phi(constants), v) to phi(binop) .
qcolombet added inline comments to D119916: Add a machine function pass to convert binop(phi(constants), v) to phi(binop) .
Jul 25 2023
Jul 25 2023
Does the patch work for you with the additional context?
The TL;DR is the semantic is correct but more recent drivers may not need that optimization anymore.
Jul 24 2023
Jul 24 2023
qcolombet added a comment to D119916: Add a machine function pass to convert binop(phi(constants), v) to phi(binop) .
Partial review
qcolombet accepted D153859: RegisterCoalescer: Fix verifier error on redef of subregister for live out implicit_defs.
LGTM.
Jul 21 2023
Jul 21 2023
Jul 19 2023
Jul 19 2023
In D154507#4509642, @qcolombet wrote:Hi @jdoerfert,
In D154507#4487631, @jdoerfert wrote:In D154507#4487519, @mehdi_amini wrote:I'm a bit confused @jdoerfert : are there two different uses of the word "demoted" here? Seems like you're referring to a transformation that turns a global into an alloca, whereas here is it just about "demoting" the linkage type of the global?
I do not see the linkage being changed, if so, to what? Local (=private or internal) is already as "good" as it gets.
Given the test result, and the comment ("Find out if a global variable can be demoted to local scope."), it looks to me as if the scope is changed, thus where the variable is "declared/visible".
That said, I was expecting (w/o knowing for sure), that a variable scoped in a function cannot be accessed by other functions. If that is wrong, the first part of my comment is mood.I think a variable scoped in a function can be accessed by other functions. Meaning, the symbol may not be visible, but the address pointed by this symbol can be accessed (i.e., it is okay to escape), because the allocations are handled at a higher level (the driver).
@guraypp do you have more details on this?
Jul 18 2023
Jul 18 2023
qcolombet committed rG9be8219f60e1: [mlir][Linalg] Add an interface to decompose complex ops (authored by qcolombet).
[mlir][Linalg] Add an interface to decompose complex ops
In D154507#4487631, @jdoerfert wrote:In D154507#4487519, @mehdi_amini wrote:I'm a bit confused @jdoerfert : are there two different uses of the word "demoted" here? Seems like you're referring to a transformation that turns a global into an alloca, whereas here is it just about "demoting" the linkage type of the global?
I do not see the linkage being changed, if so, to what? Local (=private or internal) is already as "good" as it gets.
Given the test result, and the comment ("Find out if a global variable can be demoted to local scope."), it looks to me as if the scope is changed, thus where the variable is "declared/visible".
That said, I was expecting (w/o knowing for sure), that a variable scoped in a function cannot be accessed by other functions. If that is wrong, the first part of my comment is mood.
Jul 5 2023
Jul 5 2023
I've sent a patch for review to fix the NVPTX backend limitation https://reviews.llvm.org/D154507
- Use cast free implementation
- Make the AggregatedOpInterface specific to Linalg for now (we may want to drop the interface and just use rewriter patterns.)
- Fix nits: comments, function names, move the builder first in all the added functions
- Make the implementation of the transform op cleaner (i.e., support multi result in the returned value).
Jul 4 2023
Jul 4 2023
In D154074#4471755, @Dinistro wrote:In D154074#4471645, @qcolombet wrote:Talked with @guraypp offline. I think this is a limitation in the PTX backend.
Is it possible to fix this in the PTX backend then? A limitation in this backend should not be the reason to extend the symbol visibility that potentially affects all of MLIR.
Talked with @guraypp offline. I think this is a limitation in the PTX backend.
qcolombet added inline comments to D154094: [mlir][nvgpu] Add `mbarrier.arrive.expect_tx` and `mbarrier.try_wait.parity`.
qcolombet added a comment to D154094: [mlir][nvgpu] Add `mbarrier.arrive.expect_tx` and `mbarrier.try_wait.parity`.
Thanks for the added descriptions. Still LGTM :).
qcolombet added inline comments to D152281: [Transforms][LICM] Add the ability to undo unprofitable reassociation.
LGTM with nits on the descriptions to make things easier to understand.
qcolombet committed rGf8e59b09f42c: [mlir][arith] Move getNeutralElement from Linalg utils to arith (authored by qcolombet).
[mlir][arith] Move getNeutralElement from Linalg utils to arith
Jul 3 2023
Jul 3 2023
qcolombet requested review of D154362: [mlir][arith] Move getNeutralElement from Linalg utils to arith.
qcolombet added inline comments to D153421: [mlir][Linalg] Implement the tiling interface for softmax.
[mlir][Linalg] Remove useless include
qcolombet added inline comments to D153421: [mlir][Linalg] Implement the tiling interface for softmax.
qcolombet committed rG273600ccea91: [mlir][Linalg] Implement the tiling interface for softmax (authored by qcolombet).
[mlir][Linalg] Implement the tiling interface for softmax
Jun 30 2023
Jun 30 2023
qcolombet updated subscribers of D153421: [mlir][Linalg] Implement the tiling interface for softmax.
- Add a tile and fuse test
- Remove deprecated use of cast
- Fix the way we generate the dimension (value vs. attribute)
qcolombet accepted D154094: [mlir][nvgpu] Add `mbarrier.arrive.expect_tx` and `mbarrier.try_wait.parity`.
LGTM with nits.
qcolombet added inline comments to D153421: [mlir][Linalg] Implement the tiling interface for softmax.