FlagOpen / FlagGems

FlagGems is an operator library for large language models implemented in Triton Language.
Apache License 2.0
347 stars 48 forks source link

[Operator] fix index_select bug [MooreThreads] #197

Closed Salv1a closed 2 months ago

Salv1a commented 2 months ago

PR Category

Operator

Type of Change

Bug Fix

Description

We found an issue with the definition of cols_offsets in the index_select operator. When N is larger than BLOCK_N, the indices cannot cover all the input columns.

Issue

Progress

Advice

We suggest to increase the input dimensions in the test cases, ensuring that the input dimensions are larger than the dimensions of the Triton sub-blocks, in order to improve test accuracy.

Salv1a commented 2 months ago

have to add from ..utils import libentry to test reduction ops case?

StrongSpoon commented 2 months ago

have to add from ..utils import libentry to test reduction ops case?

not necessary, but recommend rebasing on the latest master branch and running ci again.

Salv1a commented 2 months ago

have to add from ..utils import libentry to test reduction ops case?

not necessary, but recommend rebasing on the latest master branch and running ci again.

already rebased, please approve ci

Salv1a commented 2 months ago

what's wrong...?

tongxin commented 2 months ago

what's wrong...?

We'll take a look. Thanks.

StrongSpoon commented 2 months ago

what's wrong...?

add unit test parameter to cover the case you mentioned, and coverage check will pass.

Salv1a commented 2 months ago

what's wrong...?

add unit test parameter to cover the case you mentioned, and coverage check will pass.

Already modified the op test parameter, but in an inelegant way: we did not modify REDUCTION_SHAPE to avoid potential errors. Maybe you should consider increasing REDUCTION_SHAPE to ensure the accuracy of the tests.