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

Better default schedule/storage type inference #1241

Draft
wants to merge 28 commits into
base: master
Choose a base branch
from

Conversation

tbennun
Copy link
Collaborator

@tbennun tbennun commented Apr 18, 2023

(Fixes #1185)

Rewrite the default schedule/storage type inference based on the discussion in #1185. 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.

  • Users can now write codes such as
@dace.program(device=dace.DeviceType.GPU)
def myprogram(a: dace.float64[20], b: dace.float64[20]):
    a += b
    for i in dace.map[0:20]:
        out >> b[i]
        out = 5

without GPUTransform. The arrays a and b will automatically be set to reside on the GPU, and the map will be scheduled as a GPU_Device map.

The often-confusing GPU_Default schedule has now been removed as well.

tbennun and others added 27 commits April 18, 2023 08:30
@tbennun tbennun closed this Oct 19, 2023
@tbennun tbennun reopened this Oct 19, 2023
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
1 participant