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

[wild idea] Compiler plugin to support any dimension #210

Open
Jolanrensen opened this issue Sep 30, 2024 · 1 comment
Open

[wild idea] Compiler plugin to support any dimension #210

Jolanrensen opened this issue Sep 30, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@Jolanrensen
Copy link

Jolanrensen commented Sep 30, 2024

While Multik supports https://github.com/Kotlin/multik/blob/develop/multik-core/src/commonMain/kotlin/org/jetbrains/kotlinx/multik/ndarray/data/Dimensions.kt up to 4 type-safe dimensions, it might be cool to attempt to make a K2 compiler plugin that can support any number of dimensions based on what the user creates.
It's just a wild idea, of course, but I believe it to be possible. It would certainly show the strength of the Kotlin 2.0 compiler while enhancing matrix multiplications at the same time :)

In some cases it could even simplify the maintainability, as you'd no longer have to write each operating for 1, 2, 3, 4, and n dimensions, just once for n.

@devcrocod devcrocod added the enhancement New feature or request label Sep 30, 2024
@devcrocod
Copy link
Contributor

This is a good idea
Besides, there was already such a project:
https://ai.meta.com/blog/paving-the-way-for-software-20-with-kotlin/
https://github.com/facebookresearch/diffkt

Perhaps, with K2 this has more prospects

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