Skip to content

Conversation

@TinaAMD
Copy link

@TinaAMD TinaAMD commented Dec 16, 2024

I can unfortunately not really test this since there is not type conversion from float to an opaque type.
We might want some made-for-testing-purposes opaque type conversions (in a separate PR) to ensure that opaque type conversions are handled properly in all upstream lowerings.

@TinaAMD
Copy link
Author

TinaAMD commented Dec 16, 2024

Allowed opaque types no in more places and added tests to the CastOp to make sure the verifier is fine with the opaque type casts.
It is still enforced that if you convert an opaque type to an array, that needs to be an array ref. Should that restriction stay as-is?

@cferry-AMD
Copy link
Collaborator

It is still enforced that if you convert an opaque type to an array, that needs to be an array ref. Should that restriction stay as-is?

I would tend to say yes. Any cast into an array must be a reference cast from some other lvalue, otherwise as far as I know, that's illegal (I have a doubt on explicit casts of initializer lists though, that are not lvalues, but these are currently not supported). The best we can do if the type is opaque is to skip the lvalue-ness check.

@TinaAMD TinaAMD merged commit 992dad3 into feature/fused-ops Dec 17, 2024
4 checks passed
@TinaAMD TinaAMD deleted the tina.FXML-5200-opaque-or-cast-compatible branch December 17, 2024 08:39
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.

4 participants