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

In order to be compatible with iree-turbine, make iree-turbine can support training #17342

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mollon650
Copy link

@mollon650 mollon650 commented May 10, 2024

support iree-turbine can support training ,i modify some code
The modified code is distributed in iree/torch-mlir/iree-turbine
ref:iree-org/iree-turbine#13
iree-org/torch-mlir#1

Copy link

google-cla bot commented May 10, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@mollon650 mollon650 changed the title In order to be compatible with iree-turbine, make iree-turbine can training In order to be compatible with iree-turbine, make iree-turbine can support training May 10, 2024
Copy link
Collaborator

@stellaraccident stellaraccident left a comment

Choose a reason for hiding this comment

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

What use case is driving the need for device index? The enumeration order is not stable, and it does not necessarily match the order that other software has. There are all sorts of corner cases with CUSA_VISIBLE_DEVICES, etc.

We're working on a better thing upstream: pytorch/pytorch#125083

@mollon650
Copy link
Author

device index is used for export buffer , how to get the index from driver in a better method? @stellaraccident

@stellaraccident
Copy link
Collaborator

Generally you want to use the uuid. That is what the patch I showed is adding to torch.

Copy link
Collaborator

@benvanik benvanik left a comment

Choose a reason for hiding this comment

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

yeah we can't plumb this through - device indices aren't stable or meaningful at the HAL level and not something that can be queried after the device is created (as we may be taking in device pointers that have no indices). There shouldn't be a need for a device index in IREE after creation.

The device name being queried here is also not a device name that makes sense outside of IREE (and can essentially be empty) so you can't write code relying on it. The same device may have multiple names or the same name may alias to multiple devices.

@ScottTodd ScottTodd removed their request for review July 8, 2024 15:39
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.

3 participants