-
Notifications
You must be signed in to change notification settings - Fork 625
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
base: main
Are you sure you want to change the base?
Conversation
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. |
There was a problem hiding this 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
device index is used for export buffer , how to get the index from driver in a better method? @stellaraccident |
Generally you want to use the uuid. That is what the patch I showed is adding to torch. |
There was a problem hiding this 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.
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