fix: add cuda backend support for to_raggedtensor and from_raggedtensor functions#3263
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files
|
|
@jpivarski while trying to make the However if try to do the same with the Should I make the function use a TensorFlow policy and automatically select a device or create some kind of workaround? |
|
If this is not possible and TensorFlow returns an object whose backend depends on what hardware is available (a terrible practice! shame on TensorFlow!), then we'll have to explain that (apologetically) in our documentation. |
…r-raggedtensor-conversions
…or-raggedtensor-conversions' into maxymnaumchyk/add-cuda-support-for-raggedtensor-conversions
jpivarski
left a comment
There was a problem hiding this comment.
This is looking good! I added some possible changes—actually, "things to think about" because you know the TensorFlow situation better than I do.
This could also use tests. Would it be sufficient to copy the to/from raggedtensor tests from the tests/ directory to tests-cuda/ and replace NumPy arrays with CuPy arrays?
Just as you can run the normal tests with
python -m pytest testsyou can run the CUDA tests with
python -m pytest tests-cudaon a computer with an Nvidia GPU.
jpivarski
left a comment
There was a problem hiding this comment.
This is good! Except maybe for the case of more than 10 GPUs: see below. Once that's fixed, this would be ready to merge.
No description provided.