Uh oh!
There was an error while loading. Please reload this page.
deprecate qk layer scaling and fp32 softmax args - #90
Conversation
Signed-off-by: Kirthi Shankar Sivamani <ksivamani@nvidia.com>
ksivaman
commented
Mar 10, 2023
/te-ci |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Signed-off-by: Kirthi Shankar Sivamani <ksivamani@nvidia.com>
| b, np, sq, sk = inp.size() | ||
| scale = self.scale if self.scale is not None else 1.0 | ||
| scale = 1.0 | ||
| if self.scale is not None and self.input_in_fp16: |
There was a problem hiding this comment.
I don't like this - I would not want function named "scaled_softmax" to apply the scale I provided only in certain cases, this is surprising and will lead to bugs. It should be the responsibility of the caller of that softmax to either provide or not provide the scale depending on the input type.
| attention_mask_func, | ||
| attention_softmax_in_fp32, | ||
| layer_number if apply_query_key_layer_scaling else None, | ||
| layer_number, |
There was a problem hiding this comment.
Maybe you need to move that scale to the forward call of the softmax so that you know what type its input is going to be.
There was a problem hiding this comment.
And then pass None if it is not fp16.
Signed-off-by: Kirthi Shankar Sivamani <ksivamani@nvidia.com>
ksivaman
commented
Mar 11, 2023
/te-ci |
* deprecate qk layer scaling and fp32 softmax args Signed-off-by: Kirthi Shankar Sivamani <ksivamani@nvidia.com> * apply QK layer scaling for fp16 training Signed-off-by: Kirthi Shankar Sivamani <ksivamani@nvidia.com> * address review comments Signed-off-by: Kirthi Shankar Sivamani <ksivamani@nvidia.com> --------- Signed-off-by: Kirthi Shankar Sivamani <ksivamani@nvidia.com> Signed-off-by: Charlene Yang <charleney@nvidia.com>
* deprecate qk layer scaling and fp32 softmax args Signed-off-by: Kirthi Shankar Sivamani <ksivamani@nvidia.com> * apply QK layer scaling for fp16 training Signed-off-by: Kirthi Shankar Sivamani <ksivamani@nvidia.com> * address review comments Signed-off-by: Kirthi Shankar Sivamani <ksivamani@nvidia.com> --------- Signed-off-by: Kirthi Shankar Sivamani <ksivamani@nvidia.com> Signed-off-by: Charlene Yang <charleney@nvidia.com>
When importing cudnn-frontend as a 3rd party library using FetchContent, cmake incorrectly parse the file path. This is because we incorrectly using CMAKE_SOURCE_DIR variable, which should be PROJECT_SOURCE_DIR (The former one refers to the top-level source directory that contains a CMakeLists.txt, while the latter refers to the source directory of the most recent project() command
No description provided.