Refactor codegen to separate GPU/CPU code generation#176
Merged
yaoyaoding merged 9 commits intohidet-org:mainfrom Apr 21, 2023
Merged
Refactor codegen to separate GPU/CPU code generation#176yaoyaoding merged 9 commits intohidet-org:mainfrom
yaoyaoding merged 9 commits intohidet-org:mainfrom
Conversation
Member
|
Hi @LDY1998, Thanks for the PR! Please let us know when you think this PR is ready for review. |
yaoyaoding
reviewed
Apr 20, 2023
Member
yaoyaoding
left a comment
There was a problem hiding this comment.
Hi @LDY1998, the PR looks good in general. I left some minor comments. Because it does not influence the existing cuda implementation, after you fixing these comments, we can merge it to the main branch.
Member
|
You can also create an issue to track the support for CPU backend. |
Member
|
Thanks @LDY1998! |
3 tasks
AndreSlavescu
pushed a commit
to AndreSlavescu/hidet
that referenced
this pull request
Apr 25, 2023
…-org#176) * refactor codegen to separate cpu and gpu backend * add float16 and bfloat16 headers * register bfloat16 primitive functions * register fp16 primitive functions * formatting * modify codegen * rename bfloat16 and float16 type * fix rename * fix comment
AndreSlavescu
pushed a commit
to AndreSlavescu/hidet
that referenced
this pull request
Apr 25, 2023
…-org#176) * refactor codegen to separate cpu and gpu backend * add float16 and bfloat16 headers * register bfloat16 primitive functions * register fp16 primitive functions * formatting * modify codegen * rename bfloat16 and float16 type * fix rename * fix comment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is an attempt to refactor codegen.py to separate code generation for GPU and CPU, it also adds emulation for fp16 and bfloat16 as cpu has no native support for them. I didn't change the workflow of compilation yet since we only want to run CPU codegen of hidet in an environment without CUDA support, this means that all the dependencies of
cudartshould not run when GPU is not available.Tasks:
Tasks to be done:
cudart