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

Add dtype parameter to Tensor state in python frontend. #3269

Open
rdspring1 opened this issue Oct 24, 2024 · 4 comments
Open

Add dtype parameter to Tensor state in python frontend. #3269

rdspring1 opened this issue Oct 24, 2024 · 4 comments
Assignees
Labels
good first issue Good for newcomers Python API Issues related to the Python API

Comments

@rdspring1
Copy link
Collaborator

Currently, we only track the number of dimensions in the Tensor struct. Tracking the dtype of the tensor would also be useful information to track.

Reference: https://github.com/NVIDIA/Fuser/blob/main/csrc/python_frontend/fusion_definition.h#L31-L75

@rdspring1 rdspring1 added good first issue Good for newcomers Python API Issues related to the Python API labels Oct 24, 2024
@rdspring1 rdspring1 self-assigned this Oct 25, 2024
@kevinstephano
Copy link
Collaborator

The Tensor struct in the python frontend is not the same as a TensorView in nvFuser's IR that has more information. Therefore, what is the motivating use case to add dtype to the struct?

@rdspring1
Copy link
Collaborator Author

You can perform heuristic and segmentation analysis without building the cpp Fusion IR.

You wanted to do segmentation in python. How you do better than the CPP algorithm without additional information?

You already have the fusion DAG, but you need the tensor sizes and dtype information to score the segments. Most device information is already available through pytorch.

@rdspring1
Copy link
Collaborator Author

Segmentation decomposes a fusion into a directed acyclic graph (DAG) of sub-fusions. You can map a fusion directly to its component sub-fusions without building the CPP Fusion IR.

@Aditya-PS-05
Copy link

@rdspring1 , I would like to work on it. Please assign it to me or should I just create a pr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers Python API Issues related to the Python API
Projects
None yet
Development

No branches or pull requests

3 participants