Skip to content

Do not perform DTensor isinstance check for all nvFuser inputs at runtime #2651

@IvanYashchuk

Description

@IvanYashchuk

🐛 Bug

Current nvFuser executor in Thunder checks every argument at runtime if it's DTensor or not. This check should be performed at trace construction time because the dispatch to DTensor-based execution or not should be done solely based on the types recorded in the trace.

Place where DTensor check is performed:

if dist.is_available() and any(isinstance(t, torch.distributed.tensor.DTensor) for t in args):

This would involve updating the construction of FusionDefinitionWrapper to include a new attribute "use_dtensor_execute" (or some better name) to control the dispatch.

cc @tfogal

Metadata

Metadata

Assignees

Labels

DTensorIssues about DTensor support in Thundernvfuser

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions