Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion flash_mla/flash_mla_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def flash_mla_with_kvcache(
if softmax_scale is None:
softmax_scale = q.shape[-1] ** (-0.5)
if indices is not None:
assert causal == False, "causal must be `false` if sparse attention is enabled."
assert not causal, "causal must be False when sparse attention is enabled (indices provided)"
out, softmax_lse = flash_mla_cuda.fwd_kvcache_mla(
q,
k_cache,
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ def get_nvcc_thread_args():
try:
cmd = ['git', 'rev-parse', '--short', 'HEAD']
rev = '+' + subprocess.check_output(cmd).decode('ascii').rstrip()
except Exception as _:
except (subprocess.CalledProcessError, FileNotFoundError, OSError):
# Fallback to timestamp if git is not available or not in a git repo
now = datetime.now()
date_time_str = now.strftime("%Y-%m-%d-%H-%M-%S")
rev = '+' + date_time_str
Expand Down