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

[Graph] Translate softmax and reduce to hidet script #242

Merged
merged 12 commits into from Jun 2, 2023

Conversation

Aalanli
Copy link
Collaborator

@Aalanli Aalanli commented May 23, 2023

Sorry, I did something to my fork that I could not reverse; I thought that deleting the fork would not close the PR.

In regards to the comments:

  • There seems to be no reason for the prologue to be disabled, but the FP16 reduce version does. I re-enabled the prologue
  • implemented suggestions for xdtype and x_shape
  • yes, warp_reduce(rv, prim.sum) works, can't find operator.sum

Everything works as expected.

Copy link
Member

@yaoyaoding yaoyaoding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Aalanli!

return True
else:
# use self.cuda_schedule_reduce_by_default
return False
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just looked at the self.cuda_schedule_reduce_by_default(...) implementation, seems it is okay to fuse prologue.

python/hidet/graph/ops/definitions/reduce/reduce.py Outdated Show resolved Hide resolved
python/hidet/graph/ops/definitions/reduce/reduce.py Outdated Show resolved Hide resolved
python/hidet/graph/ops/definitions/reduce/reduce.py Outdated Show resolved Hide resolved
python/hidet/graph/ops/definitions/softmax.py Outdated Show resolved Hide resolved
@yaoyaoding
Copy link
Member

Thanks @Aalanli !

@yaoyaoding yaoyaoding merged commit 59e2eae into hidet-org:main Jun 2, 2023
2 checks passed
@Aalanli Aalanli deleted the hidet_script branch September 27, 2023 18:09
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

Successfully merging this pull request may close these issues.

None yet

2 participants