MultiDeviceExecutor ignores stream-parallel allocation IterDomains.

Open
#5,525 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp
Domain
backend, compilers

Research direction

Start with csrc/multidevice/execution_utils.cpp, especially lines 69-85, and compare the allocation contracts in MultiDeviceExecutor and FusionExecutorCache. Trace the stream-parallel allocation-domain handling for the example output TV, then validate that the resulting allocation follows the allocation domain without the current logical-domain workaround.

Written by the indexing model from the issue text.

Description

For example, a fusion segment with an output TV logical/loop/allocation: [iStream{2}, 3] will produce a tensor of shape [2, 3]. This full allocation is not necessary when the segment that consumes that tensor is in the same loop.

Instead, FusionExecutorCache allocates a "sharded" tensor when the TV's allocation domain is stream-parallel. For example, the above output TV leads to shape [1, 3] instead. This contract also sounds more natural because the allocation domain dictates allocation.

Currently, I'm hacking around this difference by following MultiDeviceExecutor's contract when the allocation ID is in the logical domain and following the FusionExecutorCache's contract when the allocation ID is not in logical -- e.g. a split of a logical ID.

But let me know if there's a better way.

cc @samnordmann

Dominant language
C++
Stars
404
Forks
84
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from NVIDIA/Fuser

All issues in NVIDIA/Fuser

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.