Skip to content

config(flash-sac): enable full-objective compile - #1641

Merged
TATP-233 merged 1 commit into
Motphys:mainfrom
EtherealTide:perf/flash-sac-enable-full-objective
Sep 24, 2026
Merged

TATP-233 merged 1 commit into
Motphys:mainfrom
EtherealTide:perf/flash-sac-enable-full-objective

Conversation

@EtherealTide

Copy link
Copy Markdown
Contributor

Summary

Enable FlashSAC full-objective compilation in the UniLab owner configuration.

The configuration now sets:

use_compile: true
compile_full_objectives: true

Manual actor and critic CUDA Graph switches remain disabled by default.

Why

The corresponding unilab_rl implementation extends FlashSAC compilation from loss-only helpers to the complete critic and actor objectives.

This allows Inductor to optimize:

  • Target actor forward
  • Target critic forward
  • Online critic forward
  • Categorical TD projection
  • Critic loss
  • Actor forward
  • Critic forward
  • Actor loss

The full-objective compile path is the recommended production configuration because it provides most of the measured performance improvement while avoiding the additional lifecycle complexity of an outer manual CUDA Graph.

Performance Reference

Measured on an NVIDIA RTX 4090 with PyTorch 2.8.0+cu128, BF16 AMP, batch size 2048, and G1-like dimensions 98/101/29.

Mode Mean Median P90 P95
Eager with deferred metrics 13.221 ms 13.201 ms 13.724 ms 13.863 ms
Full-objective compile 4.873 ms 4.916 ms 5.368 ms 5.764 ms

The full-objective compile path reduces mean learner-round time by approximately 63.1% compared with deferred eager execution in the learner microbenchmark.

Dependency Requirement

This configuration requires a unilab_rl version that contains the compile_full_objectives FlashSAC implementation and builder forwarding.

The unilab_rl implementation should therefore be merged and released before this configuration is enabled in the default UniLab installation.

Validation

  • Configuration diff is limited to the FlashSAC owner YAML.
  • Existing unrelated working-tree changes are not included.
  • The corresponding unilab_rl focused tests passed.

Full benchmark data and reproduction instructions are available in:

https://github.com/EtherealTide/UniLab-FlashSAC-Optmization

@TATP-233
TATP-233 merged commit ae302dd into Motphys:main Sep 24, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants