Skip to content

[NFC] Kill a couple helpers and make internal functions static#9988

Open
lezcano wants to merge 3 commits intomainfrom
static
Open

[NFC] Kill a couple helpers and make internal functions static#9988
lezcano wants to merge 3 commits intomainfrom
static

Conversation

@lezcano
Copy link
Copy Markdown
Contributor

@lezcano lezcano commented Apr 10, 2026

Co-authored-by: Codex noreply@openai.com

@lezcano
Copy link
Copy Markdown
Contributor Author

lezcano commented Apr 10, 2026

@jeffniu-openai tried it a year after your first try, worked like a charm

Comment thread python/src/ir.cc Outdated
Comment thread unittest/Dialect/TritonGPU/DialectTest.cpp
Comment thread unittest/Dialect/TritonGPU/DialectTest.cpp
@neildhar
Copy link
Copy Markdown
Collaborator

Should we enable -Wmissing-prototypes as part of this change?

@lezcano
Copy link
Copy Markdown
Contributor Author

lezcano commented Apr 11, 2026

Should we enable -Wmissing-prototypes as part of this change?

I'd be keen to add some more compiler warnings moving forward, but there has been a bit of a pushback historically in doing so. We can discuss this in next week's meeting. For now better to leave this PR as an NFC.

@lezcano lezcano force-pushed the static branch 2 times, most recently from aacf3f9 to 091fc27 Compare April 14, 2026 08:18
Copy link
Copy Markdown
Contributor

@peterbell10 peterbell10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DIdn't bother to go through all of them, but here are the first few

Comment thread lib/Conversion/TritonGPUToLLVM/ElementwiseOpToLLVM.cpp Outdated
Comment thread lib/Conversion/TritonGPUToLLVM/Utility.cpp Outdated
Comment thread lib/Dialect/TritonGPU/IR/LinearLayoutConversions.cpp Outdated
Comment thread lib/Dialect/TritonGPU/Transforms/Pipeliner/WGMMAPipeline.cpp Outdated
Comment thread lib/Dialect/TritonNvidiaGPU/IR/Dialect.cpp Outdated
Comment thread third_party/amd/lib/TritonAMDGPUTransforms/LowerLoops.cpp Outdated
lezcano and others added 3 commits April 14, 2026 17:34
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
@lezcano
Copy link
Copy Markdown
Contributor Author

lezcano commented Apr 15, 2026

Done. The heuristic was "if there is a run of 2 or more ops, do an anon namespace, otherwise use static" for the ops in this PR. There are preexisting cases of runs of plenty of contiguous functions with static but yeah.

@lezcano lezcano requested a review from peterbell10 April 15, 2026 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants