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

Determine schedule type based on surrounding storage types #1262

Merged
merged 12 commits into from Jun 5, 2023

Conversation

tbennun
Copy link
Collaborator

@tbennun tbennun commented May 24, 2023

This is a lighter version of #1241 without the entire SDFG device revamp. This PR fixes #1185 by inferring schedule types of maps based on the surrounding storage types (skipping scalar values). As opposed to #1241, this PR does not remove the GPU_Default schedule.

Comment for changelog @phschaad:

The schedule type of a scope (e.g., a Map) is now also determined by the surrounding storage. If the surrounding storage is ambiguous, dace will fail with a nice exception. This means that codes such as the one below:

@dace.program
def add(a: dace.float32[10, 10] @ dace.StorageType.GPU_Global, 
        b: dace.float32[10, 10] @ dace.StorageType.GPU_Global):
    return a + b @ b

will now automatically run the + and @ operators on the GPU.

@tbennun tbennun marked this pull request as draft May 24, 2023 15:02
@tbennun tbennun marked this pull request as ready for review June 4, 2023 05:09
Copy link
Collaborator

@phschaad phschaad left a comment

Choose a reason for hiding this comment

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

This looks good to me.

@tbennun tbennun merged commit fe68f39 into master Jun 5, 2023
9 checks passed
@tbennun tbennun deleted the schedule-storage-lite branch June 5, 2023 19:20
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.

Python frontend should use storage type of array to determine map schedule
3 participants