Skip to content

fix sid-gr-inference perf script - #433

Merged
shijieliu merged 1 commit into
NVIDIA:mainfrom
gameofdimension:patch-5
Jul 7, 2026
Merged

shijieliu merged 1 commit into
NVIDIA:mainfrom
gameofdimension:patch-5

Conversation

@gameofdimension

@gameofdimension gameofdimension commented Jul 6, 2026 •

Copy link
Copy Markdown
Contributor

Description

Fix #434

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@gameofdimension
gameofdimension marked this pull request as draft July 6, 2026 12:51
@greptile-apps

greptile-apps Bot commented Jul 6, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR extends run_container.sh to mount an external corelib/gr_decode_atten directory into the container and expose it as GR_DECODE_ATTEN_ROOT, fixing a missing dependency for the SID-GR inference perf script.

  • Adds CORELIB_GR_DECODE_ATTEN_DIR resolved via realpath from ${WORKSPACE_DIR}/../corelib/gr_decode_atten, with a ${VAR:-default} override pattern.
  • Derives CONTAINER_GR_DECODE_ATTEN_DIR as a fixed path inside the container repo dir and mounts it unconditionally in docker_args.
  • Passes GR_DECODE_ATTEN_ROOT as an environment variable into the container session.

Confidence Score: 4/5

The script will fail at startup for any user who does not have the corelib path in place and has not pre-exported CORELIB_GR_DECODE_ATTEN_DIR, and will fail docker run for users who lack the directory at mount time — both behaviours are unlike the guarded SGLANG_REPO_DIR handling already in the script.

The new realpath call executes unconditionally at variable-assignment time under set -euo pipefail, so the script exits before doing anything useful when the corelib directory is absent. The volume mount is also appended unconditionally, causing docker run to fail rather than warning gracefully, in contrast to the if -d guard on the SGLANG_REPO_DIR mount just a few lines later. Both issues are real defects on the changed path and have been flagged in prior review threads awaiting resolution.

examples/sid-gr-inference/scripts/run_container.sh — specifically the realpath call and the unconditional volume mount block.

Important Files Changed

Filename Overview
examples/sid-gr-inference/scripts/run_container.sh Adds CORELIB_GR_DECODE_ATTEN_DIR host path resolution, CONTAINER_GR_DECODE_ATTEN_DIR container path, a GR_DECODE_ATTEN_ROOT env var, and an unconditional volume mount — issues with realpath on missing path, hardcoded container variable, and unguarded mount have been flagged in prior review threads.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[run_container.sh starts] --> B[Resolve CORELIB_GR_DECODE_ATTEN_DIR via realpath]
    B -->|path missing and pipefail active| C[Script aborts]
    B -->|path exists or env pre-set| D[Build docker_args array]
    D --> E[Always append corelib volume mount unconditionally]
    E -->|host dir missing| F[docker run fails]
    E -->|host dir exists| G[docker run succeeds - GR_DECODE_ATTEN_ROOT set in container]
    D --> H[Conditional: if -d SGLANG_REPO_DIR then append sglang mount]
    H --> G
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[run_container.sh starts] --> B[Resolve CORELIB_GR_DECODE_ATTEN_DIR via realpath]
    B -->|path missing and pipefail active| C[Script aborts]
    B -->|path exists or env pre-set| D[Build docker_args array]
    D --> E[Always append corelib volume mount unconditionally]
    E -->|host dir missing| F[docker run fails]
    E -->|host dir exists| G[docker run succeeds - GR_DECODE_ATTEN_ROOT set in container]
    D --> H[Conditional: if -d SGLANG_REPO_DIR then append sglang mount]
    H --> G
Loading

Reviews (2): Last reviewed commit: "Add environment variable for GR decode a..." | Re-trigger Greptile

@gameofdimension gameofdimension changed the title Add environment variable for GR decode attention fix sid-gr-inference perf script Jul 6, 2026
@gameofdimension
gameofdimension marked this pull request as ready for review July 6, 2026 13:04
@shijieliu
shijieliu self-requested a review July 7, 2026 01:16
@shijieliu
shijieliu merged commit f69725b into NVIDIA:main Jul 7, 2026
1 check passed
@gameofdimension
gameofdimension deleted the patch-5 branch July 13, 2026 06:06
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.

[BUG] Failed to run the sid-gr-inference performance script

2 participants