|
37 | 37 | cuda_train_enabled, |
38 | 38 | triton_infer_level, |
39 | 39 | triton_train_level, |
40 | | - use_cute_infer, |
41 | 40 | use_cutile_infer, |
42 | 41 | ) |
43 | 42 | from deepmd.utils.version import ( |
@@ -1215,31 +1214,27 @@ def __init__( |
1215 | 1214 | self.compute_dtype = get_promoted_dtype(self.dtype) |
1216 | 1215 | # Opt-in fused fast paths, selected by ``DP_TRITON_INFER`` / |
1217 | 1216 | # ``DP_TRITON_TRAIN`` (cumulative levels, see :func:`triton_infer_level` |
1218 | | - # and :func:`triton_train_level`) and ``DP_CUTE_INFER``. Each is read |
| 1217 | + # and :func:`triton_train_level`). Each is read |
1219 | 1218 | # once at construction so it becomes a compile-time constant in the |
1220 | 1219 | # traced (``make_fx``) graph. Level 1 replaces the dense ``bmm`` |
1221 | 1220 | # rotation with universal Triton kernels; level 2 additionally binds the |
1222 | 1221 | # table-configured fused value path; inference level 3 routes the mixing |
1223 | 1222 | # stack through the fp16x3 tensor-core operator on swept shapes. |
1224 | | - # ``DP_CUTE_INFER`` selects the experimental CuTe value-path operator |
1225 | | - # instead; both gates claim the same ``so2_message`` value path, so |
1226 | | - # enabling them together has no coherent meaning and is rejected at |
1227 | | - # construction. The CuTe, cuTile and hand-written CUDA paths remain |
1228 | | - # inference-only. The fused value-path entries are bound at the end of |
1229 | | - # construction (once every submodule exists) and stay ``None`` when the |
1230 | | - # backend is unavailable or the block layout is unsupported. |
| 1223 | + # ``DP_CUTILE_INFER`` selects a complete alternative SO(2) path and is |
| 1224 | + # therefore mutually exclusive with Triton. CuTe dispatch is resolved at |
| 1225 | + # the enclosing SeZM block, where its exact-shape K1 kernel can coexist |
| 1226 | + # with these fallback paths. cuTile and the hand-written CUDA paths remain |
| 1227 | + # inference-only. Fused entries stay ``None`` when their backend is |
| 1228 | + # unavailable or the block layout is unsupported. |
1231 | 1229 | self.triton_infer_level = triton_infer_level() |
1232 | 1230 | self.triton_train_level = triton_train_level() |
1233 | 1231 | self.use_triton_infer = self.triton_infer_level >= 1 |
1234 | | - self.use_cute_infer = use_cute_infer() |
1235 | 1232 | self.use_cutile_infer = use_cutile_infer() |
1236 | | - if sum((self.use_triton_infer, self.use_cute_infer, self.use_cutile_infer)) > 1: |
| 1233 | + if self.use_triton_infer and self.use_cutile_infer: |
1237 | 1234 | raise ValueError( |
1238 | | - "DP_TRITON_INFER, DP_CUTE_INFER and DP_CUTILE_INFER are mutually " |
1239 | | - "exclusive: each selects a complete accelerated inference path. " |
1240 | | - "Enable exactly one of them." |
| 1235 | + "DP_TRITON_INFER and DP_CUTILE_INFER are mutually exclusive: " |
| 1236 | + "each selects a complete accelerated SO(2) inference path." |
1241 | 1237 | ) |
1242 | | - self._cute_value_path = None |
1243 | 1238 | self._triton_value_path = None |
1244 | 1239 | self._cutile_value_path = None |
1245 | 1240 |
|
@@ -1753,19 +1748,9 @@ def __init__( |
1753 | 1748 | if SEGMENT_SOFTMAX_TRITON_AVAILABLE: |
1754 | 1749 | self._segment_softmax_fn = segment_softmax |
1755 | 1750 |
|
1756 | | - # === Step 17. Optional fused CuTe SO(2) value-path operator === |
1757 | | - # Experimental alternative backend; mutually exclusive with the Triton |
1758 | | - # flag (enforced above). |
1759 | | - if self.use_cute_infer: |
1760 | | - from deepmd.pt_expt.kernels.cute.sezm import ( |
1761 | | - make_cute_value_path, |
1762 | | - ) |
1763 | | - |
1764 | | - self._cute_value_path = make_cute_value_path(self) |
1765 | | - |
1766 | | - # === Step 18. Optional fused cuTile SO(2) value-path operators === |
1767 | | - # Complete cuTile inference path, mutually exclusive with the two gates |
1768 | | - # above. The factory validates the block layout and returns ``None`` |
| 1751 | + # === Step 17. Optional fused cuTile SO(2) value-path operators === |
| 1752 | + # Complete cuTile inference path, mutually exclusive with Triton. The |
| 1753 | + # factory validates the block layout and returns ``None`` |
1769 | 1754 | # otherwise, leaving the dense reference path in charge. |
1770 | 1755 | if self.use_cutile_infer: |
1771 | 1756 | from deepmd.pt_expt.kernels.cutile.sezm.so2_value_path import ( |
@@ -2460,12 +2445,6 @@ def so2_message( |
2460 | 2445 | # inter-layer activations off the traced graph. === |
2461 | 2446 | cached_edge_csr(edge_cache, "src", x.shape[0]) |
2462 | 2447 | x_local, rad_feat = self._triton_value_path(x, edge_cache, radial_feat) |
2463 | | - elif self._cute_value_path is not None and not self.training: |
2464 | | - # === Steps 1-5 (fused CuTe operator). The operator folds |
2465 | | - # rotate_to_local, radial degree mixing, the multi-layer gated SO(2) |
2466 | | - # stack, and the focus competition into the bucketed kernels; the |
2467 | | - # per-edge focus-major intermediates stay resident on chip. === |
2468 | | - x_local, rad_feat = self._cute_value_path(x, edge_cache, radial_feat) |
2469 | 2448 | elif self._triton_rotate_mix is not None and active_triton_level(self) >= 1: |
2470 | 2449 | # === Steps 1-3 (fused rotate-mix operator). One edge-parallel |
2471 | 2450 | # kernel gathers the source features, applies the block-diagonal |
|
0 commit comments