Skip to content

[Kernels] added triton-implemented of self attention for colossal-ai #4241

Merged
tiandiao123 merged 23 commits intohpcaitech:mainfrom
tiandiao123:self-attention
Jul 18, 2023
Merged

[Kernels] added triton-implemented of self attention for colossal-ai #4241
tiandiao123 merged 23 commits intohpcaitech:mainfrom
tiandiao123:self-attention

Conversation

@tiandiao123
Copy link
Copy Markdown
Contributor

@tiandiao123 tiandiao123 commented Jul 16, 2023

📌 Checklist before creating the PR

  • I have created an issue for this PR for traceability
  • The title follows the standard format: [doc/gemini/tensor/...]: A concise description
  • I have added relevant tags if possible for us to better distinguish different PRs

🚨 Issue number

Link this PR to your issue with words like fixed to automatically close the linked issue upon merge

e.g. fixed #1234, closed #1234, resolved #1234

📝 What does this PR do?

This PR is used to add softmax, qkv_matmul and self-attention kernels (triton-implemented) for colossal-ai

💥 Checklist before requesting a review

  • I have linked my PR to an issue (instruction)
  • My issue clearly describes the problem/feature/proposal, with diagrams/charts/table/code if possible
  • I have performed a self-review of my code
  • I have added thorough tests.
  • I have added docstrings for all the functions/methods I implemented

⭐️ Do you enjoy contributing to Colossal-AI?

  • 🌝 Yes, I do.
  • 🌚 No, I don't.

Tell us more if you don't enjoy contributing to Colossal-AI.

@tiandiao123 tiandiao123 marked this pull request as draft July 16, 2023 07:03
@tiandiao123 tiandiao123 marked this pull request as ready for review July 17, 2023 06:07
@tiandiao123 tiandiao123 requested review from oahzxl and ver217 July 17, 2023 06:08
Comment thread colossalai/kernel/triton/ops.py Outdated
Comment thread tests/test_kernels/test_softmax.py Outdated
@tiandiao123 tiandiao123 merged commit 4b97754 into hpcaitech:main Jul 18, 2023
@tiandiao123 tiandiao123 deleted the self-attention branch July 18, 2023 16:05
tiandiao123 added a commit to tiandiao123/ColossalAI that referenced this pull request Jul 28, 2023
…pcaitech#4241)

* added softmax kernel

* added qkv_kernel

* added ops

* adding tests

* upload tets

* fix tests

* debugging

* debugging tests

* debugging

* added

* fixed errors

* added softmax kernel

* clean codes

* added tests

* update tests

* update tests

* added attention

* add

* fixed pytest checking

* add cuda check

* fix cuda version

* fix typo
ver217 pushed a commit that referenced this pull request Jul 28, 2023
* [Kernels] added triton-implemented of self attention for colossal-ai  (#4241)

* added softmax kernel

* added qkv_kernel

* added ops

* adding tests

* upload tets

* fix tests

* debugging

* debugging tests

* debugging

* added

* fixed errors

* added softmax kernel

* clean codes

* added tests

* update tests

* update tests

* added attention

* add

* fixed pytest checking

* add cuda check

* fix cuda version

* fix typo

* add bloom attention policy

* fix path

* change bloom attention
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.

2 participants