yamahei21 commited on
Commit
51f848e
·
verified ·
1 Parent(s): 3b1be13

Rebuild: 5e61da84 (auto xla attention on pre-Ampere)

Browse files
Files changed (2) hide show
  1. kit_manifest.json +2 -2
  2. scripts/lalamo_forward.py +12 -1
kit_manifest.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
- "built_from_commit": "183ed3be7c1d63f7a744ac399874dd17b79ff408",
3
  "capabilities": [
4
  "rht_int4_convert.layer_filter",
5
  "eval_quantized.dtype",
@@ -25,7 +25,7 @@
25
  "scripts/combine_lane_manifests.py": "164ba691d60b3e2987b805426c606d135dcf3cf0c855b38cf7f5d6d57628a481",
26
  "scripts/make_qad_dataset.py": "c8ca660ffe781e066fdf3c9bfce2fdf2af40bef13160519fdc6f1410f740a72d",
27
  "scripts/ag_fetch.py": "2d13b52f5f41a84c61d196a0eaaf35f2d03b39e45b4379d80adb7e84c451ef7f",
28
- "scripts/lalamo_forward.py": "141f40c46effd0b18819af88649a6c9a1fb7e9eddbb77c31d775859e343053e6",
29
  "scripts/kaggle_usage.py": "e1c4c1a902d716e09a9b8fce9a0019b152a758f2390dd34c678fc44c7aef48b1",
30
  "scripts/eval_generation.py": "bc240aef06c6ede583c3334fd0483ca9153ca07a52e22ef53c85c0b4fb90f7d2",
31
  "scripts/pull_results.py": "ad51bdd36f7ebed06ec2b7c107b00009e219a645dd148bd568737ec95cc0bfaa",
 
1
  {
2
+ "built_from_commit": "5e61da849ef34ea665922589fde5c85127d20e6f",
3
  "capabilities": [
4
  "rht_int4_convert.layer_filter",
5
  "eval_quantized.dtype",
 
25
  "scripts/combine_lane_manifests.py": "164ba691d60b3e2987b805426c606d135dcf3cf0c855b38cf7f5d6d57628a481",
26
  "scripts/make_qad_dataset.py": "c8ca660ffe781e066fdf3c9bfce2fdf2af40bef13160519fdc6f1410f740a72d",
27
  "scripts/ag_fetch.py": "2d13b52f5f41a84c61d196a0eaaf35f2d03b39e45b4379d80adb7e84c451ef7f",
28
+ "scripts/lalamo_forward.py": "8fe9a87fd7ddea0dfb9ee860d632421b6eb1ddfd6c2a2a4717767206b372f8c2",
29
  "scripts/kaggle_usage.py": "e1c4c1a902d716e09a9b8fce9a0019b152a758f2390dd34c678fc44c7aef48b1",
30
  "scripts/eval_generation.py": "bc240aef06c6ede583c3334fd0483ca9153ca07a52e22ef53c85c0b4fb90f7d2",
31
  "scripts/pull_results.py": "ad51bdd36f7ebed06ec2b7c107b00009e219a645dd148bd568737ec95cc0bfaa",
scripts/lalamo_forward.py CHANGED
@@ -61,8 +61,19 @@ def bf16_block_reason(dtype: str, capabilities: list[float]) -> str | None:
61
 
62
 
63
  def requested() -> str | None:
 
 
 
 
 
 
64
  value = os.environ.get(ENV_VAR, "").strip().lower()
65
- return value if value in ("xla", "pallas") else None
 
 
 
 
 
66
 
67
 
68
  def apply_attention_env(config):
 
61
 
62
 
63
  def requested() -> str | None:
64
+ """Explicit env wins; otherwise pick xla automatically on pre-Ampere.
65
+
66
+ Pallas-Triton needs cc >= 8.0. Scripts that do not go through run_lane
67
+ (Modal jobs, make_qad_dataset -> yaqa_calibration) used to fall back to
68
+ Pallas and die at the first forward, so the device decides for them.
69
+ """
70
  value = os.environ.get(ENV_VAR, "").strip().lower()
71
+ if value in ("xla", "pallas"):
72
+ return value
73
+ capabilities = gpu_capabilities()
74
+ if any(capability < BF16_MIN_CAPABILITY for capability in capabilities):
75
+ return "xla"
76
+ return None
77
 
78
 
79
  def apply_attention_env(config):