You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that switching let weights to const WEIGHTS doesn't seems to help.
proppy
changed the title
ir_conver should evaluate inline array RHS as const expr in proc config functions
ir_conver should recognize inline array as valid RHS const expr in proc config functions
Nov 28, 2024
proppy
changed the title
ir_conver should recognize inline array as valid RHS const expr in proc config functions
ir_convert should recognize inline array as valid RHS const expr in proc config functions
Nov 28, 2024
cdleary
added
bug
Something isn't working or is incorrect
dslx
DSLX (domain specific language) implementation / front-end
labels
Nov 28, 2024
… not useful.
Previously ConstantArray was trying to convey some type-system-level properties
as imbued in an AST node, but it was not fully accurate, and generally only
served to confuse things. This gets us back to where the AST just represents
the parsed syntax and the typechecker figures out constexpr properties and
annotates them in the type information. This also allows us to seal up the
Array AST node as final — subclassing of AST nodes can be awkward, we
generally use hierarchy in the AST very sparingly.
This reworks the deduce routine a bit to consolidate on the main discrepancy
that was there between Arrays and ConstArrays, which was that we would, for
user convenience, annotate the element type on any un-annotated numerical
literals contained within the array. This will become better and more general
will type inference 2.0 but until that comes we want to make sure we don’t have
to change code in a sprawling way.
Just trying to tighten up invariants in advance of somebody investigating
google#1748
Describe the bug
In the context of a proc
config
function, it seems thatir_convert
doesn't recognize inline array definitions as const expr .To Reproduce
Attempting to convert the following proc:
will produce the following error:
Expected behavior
ir_convert infer the
const expr
-ness for the array let binding.The text was updated successfully, but these errors were encountered: