Skip to content

Conversation

@vinx13
Copy link
Member

@vinx13 vinx13 commented Apr 16, 2024

This adds additional check for cublas BYOC as it only supports TN layout. It also change the shape requirement to multiple of 16 bytes.

cc @tqchen @ibsidorenko

@github-actions github-actions bot requested a review from tqchen April 16, 2024 21:11
Comment on lines +76 to +79
assert (
isinstance(matmul_rhs_call, tvm.relax.Call)
and matmul_rhs_call.op.name == "relax.permute_dims"
)
Copy link
Contributor

Choose a reason for hiding this comment

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

I am Ok, thank you! Just a nit question: do we need here assert for the case when rhs_call is something but not permute_dims? Just to leave rhs_transposed == False and return False in the next IF (without crash):

        if not rhs_transposed:
            # cuBLAS FP8 operations require rhs being transposed
            return False

Copy link
Member Author

Choose a reason for hiding this comment

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

if matmul_rhs_var in context.matched_bindings: this condition implies rhs is transposed (it's the only pattern that rhs is another binding being matched), so I added an assertion here, it won't crash if we have non-transposed rhs

@tqchen tqchen merged commit b3ffd97 into apache:main Apr 17, 2024
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.

3 participants