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

[feat] Support for TornadoVM Tensor types #28

Merged
merged 10 commits into from
Sep 12, 2024

Conversation

stratika
Copy link
Contributor

@stratika stratika commented Sep 12, 2024

This PR added support for the TornadoVM Tensor types (Issue #25).

Now, plugin users can define the shape for the tensor types from the plugin configuration panel, similar to the max array size. This configuration is dynamic, and users can update to run next configurations. Then the generated kernels from TornadoVM are generating the acceleration artifacts based on the user-defined shapes.

Some screenshot about the new features:
TornadoInsight-configuration-panel

Note: If the users want to run Tensor unit-tests but they do not define any shape, the default shape set by the plugin is 0, which forwards the misconfiguration to TornadoVM. In this case, TornadoVM should throw an invalid Shape configuration exception.

To test, you can use the runIDE Gradle option and open the new IDE. Then set your TornadoVM directory and the plugin configurations, and try the TestTensorTypes tests.

@stratika stratika requested a review from jjfumero September 12, 2024 07:31
@stratika stratika self-assigned this Sep 12, 2024
@stratika stratika added the enhancement New feature or request label Sep 12, 2024
@@ -40,6 +40,7 @@ public class TornadoSettingState implements PersistentStateComponent<TornadoSett
@OptionTag(converter = JdkConverter.class)
public Sdk JdkPath;
public int parameterSize;
public String tensorShapeDimensions;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we represent the dimension directly in an int value, instead of a String?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, makes sense. I decided to keep it as String because I was getting exceptions due to serialization for the TornadoSettingState.java class. I will keep a note to refactor it in future PRs.

@stratika stratika merged commit ed1db50 into beehive-lab:main Sep 12, 2024
@stratika stratika deleted the feat/tensors/support branch September 12, 2024 08:18
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

Successfully merging this pull request may close these issues.

2 participants