Skip to content

Perf/optimize fastsac - #485

Merged
TATP-233 merged 3 commits into
mainfrom
perf/optimize-fastsac
May 25, 2026
Merged

TATP-233 merged 3 commits into
mainfrom
perf/optimize-fastsac

Conversation

@Kuriharamio

Copy link
Copy Markdown
Collaborator

Summary

  • Enable conservative torch.compile support for FastSAC and FlashSAC training hot paths.
  • Add algo.algo_params.amp_dtype for SAC/FlashSAC with auto/fp16/bf16 support.
  • Allow FlashSAC double-buffer training to run with explicit training.use_amp=true and algo.algo_params.use_compile=true.

Changes

  • FastSAC:

    • Compile only _critic_loss_tensors and _actor_loss_tensors.
    • Disable CUDA Graph capture via triton.cudagraphs=false.
    • Add configurable AMP dtype; CUDA bf16 skips GradScaler.
  • FlashSAC:

    • Remove double-buffer guards that rejected AMP and compile.
    • Compile actor.get_mean_and_std, _critic_loss_tensors, and _actor_loss_tensors.
    • Add configurable AMP dtype; CUDA bf16 skips GradScaler.
  • Config/tests:

    • Add amp_dtype: auto to SAC and FlashSAC algo params.
    • Add config, compile-target, AMP dtype, and runner pass-through tests.

Validation

make test-all

CUDA/MuJoCo smoke:

uv run train --algo=sac --task=g1_walk_flat --sim mujoco \
  training.use_amp=true \
  algo.algo_params.use_compile=true \
  algo.algo_params.amp_dtype=bf16 \
  algo.max_iterations=1 \
  training.no_play=true
uv run train --algo=flashsac --task=g1_walk_flat --sim mujoco \
  algo.max_iterations=1 \
  training.use_amp=true \
  algo.algo_params.use_compile=true \
  algo.algo_params.amp_dtype=bf16 \
  training.no_play=true

@TATP-233

Copy link
Copy Markdown
Collaborator

请等我验证

@TATP-233
TATP-233 merged commit 367d9c4 into main May 25, 2026
5 checks passed
@TATP-233
TATP-233 deleted the perf/optimize-fastsac branch May 25, 2026 04:12
TATP-233 added a commit that referenced this pull request May 30, 2026
TATP-233 added a commit that referenced this pull request May 30, 2026
TATP-233 added a commit that referenced this pull request Sep 4, 2026
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