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

Frontend: add syntactic sugar for schedule and storage types. #1088

Merged
merged 5 commits into from Aug 16, 2022

Conversation

orausch
Copy link
Collaborator

@orausch orausch commented Aug 15, 2022

This enables parsing statements like

for i in dace.map[0:N] @ ScheduleType.GPU_Device
  ...

And:

def add(X: dace.float32[32] @ StorageType.GPU_Global):
  ...

(Inspired by https://exo-lang.dev)

This enables parsing statements like
```python
for i in dace.map[0:N] @ ScheduleType.GPU_Device
  ...
```
And:
```python
def add(X: dace.float32[32] @ StorageType.GPU_Global):
  ...
```
@orausch orausch requested a review from tbennun August 15, 2022 15:52
Copy link
Collaborator

@tbennun tbennun left a comment

Choose a reason for hiding this comment

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

Cool PR!

dace/data.py Show resolved Hide resolved
dace/data.py Outdated Show resolved Hide resolved
@tbennun tbennun enabled auto-merge August 15, 2022 22:30
@orausch
Copy link
Collaborator Author

orausch commented Aug 16, 2022

You're going to have to approve for auto-merge :)

@gronerl
Copy link
Collaborator

gronerl commented Aug 16, 2022

I think this breaks running non-decorated numpy code for the maps, right? Would it make sense to also add a __matmul__ to dace.map[] ?

@tbennun
Copy link
Collaborator

tbennun commented Aug 16, 2022

I think this breaks running non-decorated numpy code for the maps, right? Would it make sense to also add a __matmul__ to dace.map[] ?

Thank you! Done.

@tbennun tbennun merged commit 2beb44a into master Aug 16, 2022
@tbennun tbennun deleted the annotate-types branch August 16, 2022 22:11
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.

None yet

3 participants