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

Start branch for CUDA development #74

Closed
danpovey opened this issue Jul 26, 2020 · 5 comments
Closed

Start branch for CUDA development #74

danpovey opened this issue Jul 26, 2020 · 5 comments

Comments

@danpovey
Copy link
Collaborator

OK, I have a proposal for how we can start moving things over to the new framework.

We can't do this by incremental changes to existing code; I think it will be easier to start from the code that's currenly in the 'cuda/' subdirectory, move those files up one level and move the existing files down one level into 'old/'. We can do all this in a separate branch, say, a branch called 'cuda'.

Then the initial task is to figure out how to compile it with nvcc, with a dependency on cub (cub is a header library). (Note: we'd plan to put all the source files through nvcc).

Of course it won't compile initially, but that's OK; at least being at the stage where we have compilation errors would be an improvement.

Note: the eventual goal would be to take all the old implementations and have them be the "CPU implementation" (i.e. the one we use by default on CPU) for those algorithms. Most algorithms won't have a GPU version, initially. But of course we'd have to change things to use the types defined in cuda/, e.g. Array1, Context, Region, and so on. I'll work on completing more of the code so it's more obvious how it's supposed to work.

@qindazhu
Copy link
Collaborator

I porpose that we name with cpu instead old. We may have a few folders finally: k2/csrc/cpu, k2/csrc/cuda, k2/csrc/core, k2/csrc/util, etc.

@csukuangfj
Copy link
Collaborator

Then the initial task is to figure out how to compile it with nvcc, with a dependency on cub (cub is a header library). (Note: we'd plan to put all the source files through nvcc).

I'd like to take care of the build system.

@danpovey
Copy link
Collaborator Author

danpovey commented Jul 27, 2020 via email

@csukuangfj
Copy link
Collaborator

@danpovey
Can we assume that CUDA is a precondition for compiling K2.

If CUDA is not available, can we throw FATAL_ERROR and abort the compilation?

@danpovey
Copy link
Collaborator Author

danpovey commented Jul 27, 2020 via email

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