-
Notifications
You must be signed in to change notification settings - Fork 110
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
DeviceList/with_device inconsistency #457
Comments
How about a compromise for now where all functions related to devices take a keyword argument for whether to interpret them as one-base or zero-based? I don't want to break anyone's code which is relying on the current 1-based system for now. |
The easy solution for now is to do this |
Ya you're right. Want to submit a PR? |
Rather than fixing it after the fact we could "fix" the heuristic that determines if things are indexes or not: But I think that might be more confusing. Since it spreads TensorFlow.jl/src/generate_ops.jl Line 98 in 8a28acb
|
Because
TensorFlow.jl
with_device()
expects 1-based device numberings, we cannot natively use the output ofDeviceList()
to be fed intowith_device()
, asDeviceList()
gives zero-indexed device names.My current workaround is to do something like the following:
Personally, I would prefer that
with_device
used zero-indexed device names, as on systems with multiple devices (e.g. multiple GPUs), it adds an unnecessary extra mental burden to always remember that/job:job/replica:1/task:1/device:CPU:1
inTensorFlow.jl
is not the same thing as/job:job/replica:1/task:1/device:CPU:1
when dealing with anything else in the TensorFlow ecosystem. Regardless, we should be consistent so that the output of one function can be fed to another withinTensorFlow.jl
.The text was updated successfully, but these errors were encountered: