MCPcopy Create free account
hub / github.com/RightNow-AI/autokernel / classify_kernel

Function classify_kernel

profile.py:449–465  ·  view source on GitHub ↗

Map a CUDA kernel name to an AutoKernel op type.

(kernel_name: str)

Source from the content-addressed store, hash-verified

447 continue
448 except Exception:
449 pass
450 raise RuntimeError(
451 f"Forward pass failed: {e}\n"
452 "Check that --input-shape and --class-name are correct."
453 ) from e
454
455 raise RuntimeError("Could not run forward pass with any batch size.")
456
457
458# ---------------------------------------------------------------------------
459# Kernel classification
460# ---------------------------------------------------------------------------
461
462def classify_kernel(kernel_name: str) -> str:
463 """Map a CUDA kernel name to an AutoKernel op type."""
464 name_lower = kernel_name.lower()
465
466 for fragments, op_type in _KERNEL_CLASSIFICATION:
467 for frag in fragments:
468 if frag in name_lower:

Callers 1

profile_modelFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected