Skip to content

Commit

Permalink
bump thunder dependency to main (#1701)
Browse files Browse the repository at this point in the history
  • Loading branch information
t-vi authored Aug 29, 2024
1 parent 3c0c479 commit 1bfc24d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ test = [
"transformers>=4.38.0", # numerical comparisons
"einops>=0.7.0",
"protobuf>=4.23.4",
"lightning-thunder==0.2.0.dev20240623; python_version >= '3.10'",
"lightning-thunder @ git+https://github.com/Lightning-AI/lightning-thunder/ ; python_version >= '3.10' and sys_platform == 'linux'",
]
all = [
"bitsandbytes==0.42.0", # quantization
Expand Down
12 changes: 10 additions & 2 deletions tests/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,11 @@ def test_sdpa_choice(config):
torch.set_default_dtype(torch.float16)

def assert_sdpa_backend(original_fn, q, k, v, mask):
params = SDPAParams(q, k, v, mask, 0.0, True)
# SDPAParams gained an additional argument in PyTorch 2.5
args = []
if hasattr(SDPAParams, "enable_gqa"):
args.append(False)
params = SDPAParams(q, k, v, mask, 0.0, True, *args)
if expected is SDPBackend.FLASH_ATTENTION:
assert flash_sdp_enabled()
assert can_use_flash_attention(params, True)
Expand Down Expand Up @@ -786,7 +790,11 @@ def test_sdpa_choice_kv_cache(config):
torch.set_default_dtype(torch.float16)

def assert_sdpa_backend(original_fn, q, k, v, mask):
params = SDPAParams(q, k, v, mask, 0.0, True)
# SDPAParams gained an additional argument in PyTorch 2.5
args = []
if hasattr(SDPAParams, "enable_gqa"):
args.append(False)
params = SDPAParams(q, k, v, mask, 0.0, True, *args)
if expected is SDPBackend.FLASH_ATTENTION:
assert flash_sdp_enabled()
assert can_use_flash_attention(params, True)
Expand Down

0 comments on commit 1bfc24d

Please sign in to comment.