Skip to content

Commit

Permalink
fix: avoid setting use_sgmv if no kernels present (#2796)
Browse files Browse the repository at this point in the history
  • Loading branch information
drbh authored Dec 4, 2024
1 parent b57f370 commit e0db633
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions server/text_generation_server/adapters/lora.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
orient_for_rank,
pad_rank,
use_cutlass_shrink,
has_sgmv,
)


Expand Down Expand Up @@ -325,8 +326,10 @@ def load(
default=0,
)

use_sgmv = False
if prefill or max_rank > BGMV_MAX_RANK:
use_sgmv = True
if has_sgmv():
use_sgmv = True
lora_a_ptr = torch.tensor(
[
(
Expand All @@ -352,7 +355,6 @@ def load(
device=device,
)
else:
use_sgmv = False
lora_a_ptr = torch.tensor(
[
(
Expand Down

0 comments on commit e0db633

Please sign in to comment.