Skip to content

Multidevice Executor add accessor to fusion executor caches#2421

Merged
cowanmeg merged 2 commits intoNVIDIA:mainfrom
cowanmeg:executor_fec
Jun 15, 2024
Merged

Multidevice Executor add accessor to fusion executor caches#2421
cowanmeg merged 2 commits intoNVIDIA:mainfrom
cowanmeg:executor_fec

Conversation

@cowanmeg
Copy link
Collaborator

@cowanmeg cowanmeg commented Jun 14, 2024

Add MultiDeviceExecutor::getFusionExecutorCaches which returns a vector of pointers to the multidevice executor's fusion executor caches.

Note, Also renames the field workspace to workspace_ to match naming conventions.

cc @Priya2698 for #2386

@cowanmeg
Copy link
Collaborator Author

!build

Copy link
Collaborator

@samnordmann samnordmann left a comment

Choose a reason for hiding this comment

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

LGTM! One thing: I'm wondering how the caller of getFusionExecutorCaches can figure out what is the order of the FusionExecutorCache stored in the vector without accessing workspace_.group_run_order. Is my comment relevant?

@cowanmeg
Copy link
Collaborator Author

LGTM! One thing: I'm wondering how the caller of getFusionExecutorCaches can figure out what is the order of the FusionExecutorCache stored in the vector without accessing workspace_.group_run_order. Is my comment relevant?

Yup relevant question. I think the only practical use case is for simple tests like these matmul tests where we have a linear sequence of computation so we know the order. The background for this PR is for matmul with ATen execution we want to check that the executor actually goes through ATen (#2386 (comment)) but to do that we need to access the FusionExecutorCache.

@cowanmeg cowanmeg merged commit 9bf1076 into NVIDIA:main Jun 15, 2024
@Priya2698
Copy link
Collaborator

Thanks for this PR -- I added these checks to the multidevice matmul tests!

protonu pushed a commit that referenced this pull request Jun 24, 2024
Add `MultiDeviceExecutor::getFusionExecutorCaches` which returns a
vector of pointers to the multidevice executor's fusion executor caches.

Note, Also renames the field `workspace` to `workspace_` to match naming
conventions.

cc @Priya2698 for #2386
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.

4 participants