Skip to content

Commit

Permalink
[Operator] Resolve matmul to batch_matmul when lower than sm80 (#146)
Browse files Browse the repository at this point in the history
* Resolve matmul to batch_matmul when lower than sm80

* Resolve matmul to batch_matmul when lower than sm80
  • Loading branch information
hjjq authored Mar 24, 2023
1 parent 5b3ab00 commit 3a87bed
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/hidet/graph/ops/definitions/matmul/resolve.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ def resolve_f16(self, op: Operator) -> Optional[List[Tensor]]:
if not (a.dtype == dtypes.float16 and b.dtype == dtypes.float16 and a.shape[-1] % 8 == b.shape[-1] % 8 == 0):
return None

if hidet.cuda.compute_capability() < (8, 0):
return None

parallel_k = self.get_config('parallel_k', default='default') # 'default', 'search', 2, 4, ...
if isinstance(parallel_k, str):
if parallel_k == 'default':
Expand Down

0 comments on commit 3a87bed

Please sign in to comment.