Skip to content
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

any possibility / estimation of work necessary to support mps device #1243

Open
drahnreb opened this issue Sep 18, 2023 · 2 comments
Open

any possibility / estimation of work necessary to support mps device #1243

drahnreb opened this issue Sep 18, 2023 · 2 comments

Comments

@drahnreb
Copy link

drahnreb commented Sep 18, 2023

This is more like a feature request / discussion.

Apple Silicon might not be the best hardware to train FSA/FST models and k2 does not officially support training on the metal shader accelerated devices.

I tried running a training for a stateless transducer zipformer with the necessary device arguments (instead of cpu) and ran into problems e.g. with the RaggedArray implementation here.

What would be a rough estimate to rudimentary implement mps support? Could anybody give me pointers where to start?

@pzelasko
Copy link
Contributor

My 2c, surely Dan, Fangjun, and others could tell you more: besides the need to re-write the kernels for metal, you'd have to somehow work around the design based on lambdas. CUDA and moderngpu let you write the kernels as lambda functions, you'd need to figure out how to make metal work with that (IIRC k2 heavily relies on moderngpu).

@csukuangfj
Copy link
Collaborator

My 2c, surely Dan, Fangjun, and others could tell you more: besides the need to re-write the kernels for metal, you'd have to somehow work around the design based on lambdas. CUDA and moderngpu let you write the kernels as lambda functions, you'd need to figure out how to make metal work with that (IIRC k2 heavily relies on moderngpu).

Yes, Piotr is right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants