Skip to content

[FPSAN] Support for extern_elementwise in fpsan#9645

Open
pawelszczerbuk wants to merge 4 commits intotriton-lang:mainfrom
pawelszczerbuk:pawel/consan_trig
Open

[FPSAN] Support for extern_elementwise in fpsan#9645
pawelszczerbuk wants to merge 4 commits intotriton-lang:mainfrom
pawelszczerbuk:pawel/consan_trig

Conversation

@pawelszczerbuk
Copy link
Contributor

Tighten fpsan to support arbitrary float extern_elementwise, including all the libdevice functions.

@pawelszczerbuk pawelszczerbuk marked this pull request as ready for review March 5, 2026 16:54
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9803be01c8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@pawelszczerbuk
Copy link
Contributor Author

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 41fd0cb93e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +1171 to +1173
if (!op.getPure() || !isFloatLike(op.getType()) ||
op.getNumOperands() == 0 || !externHasNumericOperands(op))
return failure();

Choose a reason for hiding this comment

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

P1 Badge Instrument float-input externs with non-float results

Drop the isFloatLike(op.getType()) gate here. It prevents rewriting libdevice-style float→int externs (e.g., float2int_*, ilogb, isnan), and the later unsupported-extern walk then fails the pass for them. That breaks the commit intent to support arbitrary float extern_elementwise (including libdevice functions) and causes valid kernels to fail under fpsan.

Useful? React with 👍 / 👎.

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.

1 participant