Fix Gluon compatibility: Decorate IrisDeviceCtx.__init__ with @gluon.constexpr_function #330
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Newer Triton versions (715f6b1d442601436bf8d462db6ff8e17aec8cfb+) require
__init__methods in@aggregateclasses to be decorated with@gluon.constexpr_function. TheIrisDeviceCtx.initialize()static method callsIrisDeviceCtx(...)constructor, triggering:Root Cause
Triton commit
dc4efec242d277972b28c045aa6cdb612d3238b0titled "[Reland][BC Breaking][Frontend] Make sure aggregate members are added to the cache key" (October 30, 2025) introduced a breaking change that requires__init__methods in@aggregateclasses to use the@gluon.constexpr_functiondecorator.This commit modified the Gluon compiler to include aggregate members (including
__init__) in the cache key, which causes the compiler to analyze and validate these methods. All Triton Gluon examples were updated in the same commit to use this decorator pattern.Changes
@gluon.constexpr_functiondecorator toIrisDeviceCtx.__init__methodThis makes the constructor properly recognized by the Gluon compiler, satisfying the new validation requirements in newer Triton while remaining backward compatible with aafec417bded34db6308f5b3d6023daefae43905.
Original prompt
This section details on the original issue you should resolve
<issue_title>Investigate why latest Gluon breaks existing code</issue_title>
<issue_description>Our Gluon backend used to work fine using Triton https://github.com/triton-lang/triton with SHA aafec417bded34db6308f5b3d6023daefae43905 but now using 715f6b1d442601436bf8d462db6ff8e17aec8cfb it seems broken with this error. Check the logs of commits between working and broken and git checkout the commits if needed to see why we are getting the error below.