k2-fsa / k2

FSA/FST algorithms, differentiable, with PyTorch compatibility.
https://k2-fsa.github.io/k2
Apache License 2.0
1.1k stars 214 forks source link

Questions for compiling k2 on the ROCm environment #1202

Closed Mashiro009 closed 1 year ago

Mashiro009 commented 1 year ago

Thanks for your outstanding contribution. I have seen many documents and tutorials about how to compile k2 on the CUDA environment. However, there is less documentation about compiling k2 on ROCm.

Is it possible to compile k2 on the ROCm environment (or a user-defined environment)? Do you have any suggestions for compiling k2 on the ROCM environment? Thank you.

csukuangfj commented 1 year ago

@Mashiro009

Does ROCm support CUDA? If not, I am afraid you can only compile a CPU version of k2 for a ROCm environment.

Mashiro009 commented 1 year ago

image

CUDA and ROCm are both Compute Platforms. CUDA is designed to work with NVIDIA GPUs. ROCm is designed for AMD Radeon GPUs.

I apologize for not being familiar with k2. Can I assume that besides PyTorch, k2 has also developed a separate portion of code that relies solely on CUDA, making it unable to be installed on non-CUDA environments?

Thanks for your help. I will try to install the CPU version, and I kindly ask if the k2 development team has any plan to extend the development of k2 code for the ROCm platform.

csukuangfj commented 1 year ago

has also developed a separate portion of code that relies solely on CUDA

Yes, the GPU part of k2 is written using CUDA kernels.

Mashiro009 commented 1 year ago

Thanks.

csukuangfj commented 1 year ago

Closing as ROCm is not supported. k2 supports only CPU and GPU (via CUDA).