Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/RL-Align/RL-Kernel
/ functions
Functions
1,290 in github.com/RL-Align/RL-Kernel
⨍
Functions
1,290
◇
Types & classes
193
↳
Endpoints
3
Method
test_forward_fp32_gradient_matches_reference
(self)
tests/test_logp.py:81
Function
test_forward_fp32_ignores_ambient_autocast_and_restores_tf32
forward_fp32 is a strict fp32 reference under ambient autocast/TF32 settings.
tests/test_lm_head.py:120
Function
test_forward_fp32_ignores_ambient_autocast_and_restores_tf32
forward_fp32 is a strict fp32 reference under ambient autocast/TF32 settings.
tests/test_attention.py:136
Function
test_forward_fp32_matches_independent_reference
forward_fp32 (and the fp32 forward path, TF32 off) is bitwise-equal to a naive fp32 reference.
tests/test_attention.py:121
Function
test_forward_fp32_matches_manual_reference
(N)
tests/test_rms_norm.py:46
Function
test_forward_fp32_matches_torch_reference
(N)
tests/test_rms_norm.py:35
Method
test_forward_fp32_returns_fp32
(self)
tests/test_rope.py:62
Method
test_forward_fp32_returns_fp32
(self)
tests/test_logp.py:40
Method
test_forward_fp32_returns_fp32
(self)
tests/test_matmul.py:51
Method
test_forward_fp32_returns_fp32_even_with_bf16_input
(self)
tests/test_rope.py:68
Function
test_forward_loss_matches_reference
()
tests/test_grpo_loss.py:130
Method
test_forward_returns_input_dtype
(self, dtype)
tests/test_logp.py:47
Method
test_forward_returns_input_dtype
(self, dtype)
tests/test_matmul.py:58
Method
test_forward_vs_fp32_within_tolerance
(self, dtype, atol, rtol)
tests/test_rope.py:225
Method
test_forward_vs_fp32_within_tolerance
(self, dtype, atol)
tests/test_logp.py:141
Method
test_forward_vs_fp32_within_tolerance
(self, dtype, atol, rtol)
tests/test_matmul.py:167
Function
test_fully_masked_query_returns_zero_not_nan
All keys padded out -> the query yields 0 (not NaN), and grads stay finite.
tests/test_attention.py:292
Function
test_fused_logp_fp32_output
()
tests/test_op_accuracy.py:245
Function
test_fused_logp_indexed_fp32_output
()
tests/test_op_accuracy.py:281
Function
test_fused_logp_indexed_out_only_updates_valid_rows
()
tests/test_op_accuracy.py:259
Function
test_fused_logp_online_indexed_fp32_output
()
tests/test_op_accuracy.py:342
Function
test_fused_logp_online_indexed_out_only_updates_valid_rows
()
tests/test_op_accuracy.py:315
Function
test_fused_logp_online_out_matches_reference
()
tests/test_op_accuracy.py:299
Function
test_fused_logp_out_reuses_output_storage
()
tests/test_op_accuracy.py:229
Function
test_gpu_profiler_cpu_fallback
(monkeypatch)
tests/test_profiler.py:21
Function
test_gqa_replication
GQA: output keeps Hq=32 heads and matches the repeat_interleave reference.
tests/test_attention.py:209
Function
test_gqa_requires_divisible_heads
q heads not divisible by KV heads raises (propagated from NativeAttentionOp).
tests/test_kv_cache_attention.py:348
Function
test_gqa_requires_divisible_heads
Hq not divisible by Hkv is rejected (no valid GQA grouping).
tests/test_attention.py:218
Function
test_gradient_flows
()
tests/test_rms_norm.py:132
Function
test_gradient_flows_to_policy_logits
()
tests/test_grpo_loss.py:156
Function
test_gradient_matches_reference
fp32 autograd grads match autograd through the double-precision reference. isfinite only rules out NaN/Inf -- it can't tell a correct gradient fr
tests/test_attention.py:410
Function
test_group_advantages_matches_reference_uniform
()
tests/test_grpo_loss.py:93
Function
test_grouped_samples_share_prompt_tokens
()
tests/test_rl_batch_fixture.py:69
Function
test_grpo_gradient_step_reduces_loss
Full loss step: forward -> backward -> SGD on the policy logits lowers the loss.
tests/test_grpo_loss.py:328
Function
test_grpo_single_gpu_example_cpu_smoke
()
tests/test_grpo_single_gpu_example.py:12
Function
test_grpo_single_gpu_example_require_fused_rejects_cpu_fallback
()
tests/test_grpo_single_gpu_example.py:50
Function
test_importing_module_does_not_import_deepspeed
(monkeypatch)
tests/test_deepspeed_training_worker.py:135
Function
test_importing_module_does_not_import_ray
(monkeypatch)
tests/test_ray_actor_manager.py:179
Function
test_importing_paged_kv_baseline_does_not_import_heavy_optional_runtimes
(monkeypatch)
tests/test_paged_kv_baseline.py:152
Function
test_importing_stateless_executor_does_not_import_heavy_optional_runtimes
(monkeypatch)
tests/test_stateless_executor.py:316
Function
test_inputs_not_mutated
Pure op: cache/new tensors are not modified in place.
tests/test_kv_cache_attention.py:372
Function
test_inputs_not_mutated
Purity: no input tensor is mutated in place.
tests/test_attention.py:397
Function
test_inputs_not_mutated
()
tests/test_rms_norm.py:122
Function
test_key_padding_mask_excludes_padded_keys
Padding columns (over S_past+S_new) get zero weight (~ attending valid keys).
tests/test_kv_cache_attention.py:278
Function
test_key_padding_mask_excludes_padded_keys
key_padding_mask: padded keys get zero weight (≈ attending over valid keys only). Not bitwise-equal because the softmax reduction width differs (
tests/test_attention.py:260
Function
test_linear_logp_handoff_matches_masked_reference_across_layouts
()
tests/test_linear_logp.py:224
Function
test_lm_head_batch_invariance_slice
Axis-A: a row's logits are bitwise-independent of how many rows share the batch.
tests/test_lm_head.py:227
Function
test_lm_head_batch_invariance_with_padding
Padding extra seq positions must not perturb the real ones (bitwise).
tests/test_lm_head.py:239
Function
test_lm_head_gradient_flows
fp32 autograd matches the closed-form grads under a random cotangent.
tests/test_lm_head.py:270
Function
test_lm_head_inputs_not_mutated
Purity: no input tensor is mutated in place.
tests/test_lm_head.py:251
Function
test_load_contract_contains_expected_dtypes
()
tests/test_tolerance_contract.py:15
Function
test_load_contract_contains_expected_operator_classes
()
tests/test_tolerance_contract.py:9
Function
test_local_bridge_import_acknowledge_and_release_lifecycle
()
tests/test_weight_sync_bridge.py:115
Function
test_local_bridge_publishes_manifest_with_tensor_metadata
()
tests/test_weight_sync_bridge.py:84
Function
test_logp_native_candidate_backward_suite_passes
()
tests/test_op_checks.py:125
Function
test_logp_native_candidate_suite_passes
()
tests/test_op_checks.py:37
Function
test_logp_tflops_estimate_scales_with_shape
()
tests/test_profiler.py:31
Function
test_logprob_bfloat16_tolerance_covers_observed_reference_drift
()
tests/test_tolerance_contract.py:25
Function
test_low_precision_within_tolerance
(dtype, atol, rtol)
tests/test_rms_norm.py:87
Function
test_masked_reductions_ignore_inactive_tokens
()
tests/test_reference_ops.py:79
Function
test_masked_tokens_do_not_affect_minimal_loss
()
tests/test_rl_kernel_loss_step.py:96
Function
test_masked_tokens_do_not_affect_native_loss
()
tests/test_grpo_loss.py:290
Function
test_masked_tokens_do_not_affect_triton_loss
()
tests/test_grpo_loss.py:303
Method
test_matches_fp32_reference_bitwise
(self)
tests/test_logp.py:65
Method
test_matches_hf_reference_bitwise
NativeRoPEOp must be bitwise identical to the ISSUE_108_OPS_DEV §5 reference.
tests/test_rope.py:86
Method
test_matches_single_fp32_torch_matmul
(self)
tests/test_matmul.py:69
Function
test_measure_peak_memory_once
(monkeypatch)
tests/test_profiler.py:171
Function
test_metadata_mismatch_rejects_import_without_advancing_active_version
()
tests/test_weight_sync_bridge.py:179
Function
test_minimal_rl_loss_step_fused_logp_candidate_cuda
()
tests/test_rl_kernel_loss_step.py:135
Function
test_minimal_rl_loss_step_reference_path
()
tests/test_rl_kernel_loss_step.py:67
Function
test_misaligned_q_length_raises
q must hold exactly the new positions (Sq == S_new); a mismatch raises.
tests/test_kv_cache_attention.py:359
Function
test_missing_deepspeed_raises_explicit_blocker
(monkeypatch)
tests/test_deepspeed_training_worker.py:144
Function
test_missing_ray_raises_explicit_blocker
(monkeypatch)
tests/test_ray_actor_manager.py:188
Function
test_multi_prompt_candidates_preserve_prompt_grouping
()
tests/test_vllm_rollout_sampler.py:185
Function
test_native_attention_matches_sdpa
( dtype, atol, rtol, causal, use_explicit_scale, batch, seqlen, nheads, he
tests/test_attention_correctness.py:353
Function
test_native_attention_rejects_invalid_gqa_head_ratio
()
tests/test_attention_correctness.py:424
Function
test_native_attention_supports_gqa_mqa
(nheads, nheads_k, causal)
tests/test_attention_correctness.py:392
Function
test_native_embedding_accepts_non_int64_ids
()
tests/test_embedding.py:70
Function
test_native_embedding_matches_gather_reference
(dtype: torch.dtype)
tests/test_embedding.py:46
Function
test_native_embedding_output_shape
()
tests/test_embedding.py:62
Function
test_native_embedding_qwen3_8b_real_shape
()
tests/test_embedding.py:180
Function
test_native_fused_logp_indexed_fp32_zero_fills_inactive_rows_cpu
(method_name: str)
tests/test_op_accuracy.py:119
Function
test_native_fused_logp_indexed_out_preserves_inactive_rows_cpu
()
tests/test_op_accuracy.py:72
Function
test_native_fused_logp_online_indexed_out_preserves_inactive_rows_cpu
()
tests/test_op_accuracy.py:102
Function
test_native_fused_logp_online_out_matches_reference_cpu
()
tests/test_op_accuracy.py:91
Function
test_native_fused_logp_out_reuses_output_storage_cpu
()
tests/test_op_accuracy.py:60
Function
test_native_fused_logp_rejects_out_of_range_row_indices_cpu
()
tests/test_op_accuracy.py:134
Function
test_native_gradient_flows_to_policy_logits
()
tests/test_ratio_kl.py:100
Function
test_native_lm_head_bias
bias=None is a plain matmul; a [vocab] bias is added elementwise.
tests/test_lm_head.py:207
Function
test_native_lm_head_dtype_path_accuracy
Axis-B: the low-precision path drifts from fp32 by a bounded fraction of the output peak.
tests/test_lm_head.py:180
Function
test_native_lm_head_fp32_matches_naive_matmul
forward_fp32 (and fp32 forward, TF32 off) is bitwise-equal to a naive fp32 matmul.
tests/test_lm_head.py:101
Function
test_native_lm_head_output_shape
Output shape is hidden.shape[:-1] + (vocab,).
tests/test_lm_head.py:198
Function
test_native_lm_head_qwen3_8b_real_shape
GPU smoke test at real Qwen3-8B dims (vocab=151936, hidden=4096).
tests/test_lm_head.py:318
Function
test_native_logp_op_exposes_full_fused_logp_api
()
tests/test_op_accuracy.py:43
Function
test_native_masked_tokens_are_neutral
()
tests/test_ratio_kl.py:82
Function
test_native_matches_manual_reference
()
tests/test_linear_logp.py:215
Function
test_native_matches_reference
()
tests/test_ratio_kl.py:73
Function
test_native_ratio_is_one_when_old_equals_policy
()
tests/test_ratio_kl.py:92
Function
test_native_rejects_shape_mismatch
()
tests/test_linear_logp.py:364
Function
test_native_silu_matches_fp32_reference
(dtype: torch.dtype)
tests/test_swiglu.py:21
← previous
next →
1,001–1,100 of 1,290, ranked by callers