Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

intrinsics.transpose does not exist in plugin, leads to invalid type inference #111

Open
GoNZooo opened this issue Jan 3, 2025 · 2 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@GoNZooo
Copy link
Contributor

GoNZooo commented Jan 3, 2025

transpose from the base:intrinsics package (https://pkg.odin-lang.org/base/intrinsics/#transpose) does not seem to be recognized by the plugin and this seems to lead to invalid inference when using functions that alias it:

m1: matrix[4, 4]f32
m2 := linalg.transpose(m1)

m2 has the type UNKNOWN:
image

@obiwan87
Copy link
Owner

obiwan87 commented Jan 3, 2025

intrinsics.odin has a syntax error on line 223 (I still have to crete a PR to Odin for it). Please apply the following change to intrinsics.odin so you can have code completion:

image

However, the type inference for transpose might still not work (not sure about that).

@obiwan87
Copy link
Owner

obiwan87 commented Jan 3, 2025

Ok, I added support for polymorphic value inference, meaning that R,C in types like matrix[$R, $C] will be replaced with actual values.

The pull request for fixing intrinsics.odin is also created: odin-lang/Odin#4654

@obiwan87 obiwan87 self-assigned this Jan 3, 2025
@obiwan87 obiwan87 added the enhancement New feature or request label Jan 3, 2025
@obiwan87 obiwan87 added this to the 0.10.0 milestone Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants