Comments (10)
I can help with testing on amd if needed
from fast_rnnt.
Could you describe how you installed fast_rnnt?
I used pip to install fast_rnnt. Now I have installed the k2 and the problem is solved by using the function in k2.
from fast_rnnt.
OK that's interesting. If it's possible for you to add support for ROCM into our build system (which is I think not entirely trivial), then I think we'd appreciate that very much. This kind of thing will no doubt be used more frequently in the future.
(Also: apologies for the very late response.)
from fast_rnnt.
Could you describe how you installed fast_rnnt?
from fast_rnnt.
Hi, we had the same error after the successful building fast_rnnt for AMD using Rocm 5.4 with correct installed pytorch 2.0.1 and torchaudio 0.15.2
File "/home/ubnt/anaconda3/lib/python3.8/site-packages/fast_rnnt/rnnt_loss.py", line 533, in rnnt_loss
scores_and_grads = mutual_information_recursion(
File "/home/ubnt/anaconda3/lib/python3.8/site-packages/fast_rnnt/mutual_information.py", line 294, in mutual_information_recursion
scores = MutualInformationRecursionFunction.apply(
File "/home/ubnt/anaconda3/lib/python3.8/site-packages/torch/autograd/function.py", line 506, in apply
return super().apply(*args, **kwargs) # type: ignore[misc]
File "/home/ubnt/anaconda3/lib/python3.8/site-packages/fast_rnnt/mutual_information.py", line 157, in forward
ans = _fast_rnnt.mutual_information_forward(px, py, boundary, p)
RuntimeError: Failed to find native CUDA module, make sure that you compiled the code with K2_WITH_CUDA.
We want to use only fast_rnnt without k2. We installed it via build from source
git clone https://github.com/danpovey/fast_rnnt.git
cd fast_rnnt
export FT_MAKE_ARGS="-j32"
pip install --verbose fast_rnnt
from fast_rnnt.
It seems that Rocm isn't supported in the build.
-- No NVCC detected. Disable CUDA support
from fast_rnnt.
@bene-ges Basically if pytorch can run on Rocm, fast_rnnt can also run on it. Will have a look at this issue. Thanks!
from fast_rnnt.
But the core of fast_rnnt is the CUDA code, no? And I believe Rocm does not use cuda? So would require rewrite to support that??
from fast_rnnt.
@danpovey, rocm can compile CUDA code into the amd binary. Most of projects just add the rocm compile commands like Pytorch does. So the Pytorch build system can be an example of right solution Docs
Example of conversion of CUDA code to ROCm code and its compilation (matrix-cuda is just example of cuda code)
on ubuntu:
git clone https://github.com/lzhengchun/matrix-cuda
cd matrix-cuda
/opt/rocm-5.3.0/bin/hipify-clang matrix_cuda.cu
After this a file matrix_cuda.cu.hip
will appear which is source code for ROCm.
Then it can be compiled with HIPCC
/opt/rocm-5.3.0/bin/hipсс matrix_cuda.cu.hip
After this file a.out
will appear
from fast_rnnt.
another useful link on porting CUDA (all notations almost identical)
https://www.lumi-supercomputer.eu/preparing-codes-for-lumi-converting-cuda-applications-to-hip/
from fast_rnnt.
Related Issues (20)
- An error occurred while compiling the source code HOT 2
- CUDA error HOT 6
- Trying to Understand pruned_loss HOT 7
- #error -- unsupported GUN version ! gcc version later than 5.3 are not supported! HOT 2
- Train loss is nan or inf HOT 29
- Combination of fast_rnnt and fast_emit HOT 12
- missing: CUDNN_LIBRARY_PATH CUDNN_INCLUDE_PATH when installing HOT 3
- AssertionError: assert py.is_contiguous() HOT 12
- RuntimeError: invalid device ordinal HOT 19
- ModuleNotFoundError: No module named '_fast_rnnt' HOT 2
- Issue in installation HOT 7
- [Help wanted] Support BUILD_FOR_ALL_ARCHS
- Why T>=S constraint? HOT 15
- Error while installing HOT 6
- pip error HOT 4
- pip error
- Import fast_rnnt is Failed HOT 11
- [feature request] Enable github actions HOT 1
- T>=S constraint in latest pip version HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fast_rnnt.