Skip to content

[Bug] First compilation after fresh install always times out #380

@lyfne123

Description

@lyfne123

Diagnosis

ptoas — After downloading/installing a new ptoas binary, the very first compilation task always times out. Subsequent compilations work normally. This suggests a cold-start overhead issue in ptoas (e.g. lazy initialization, cache warm-up, or dynamic library loading on first run).

Description

Every time a fresh ptoas binary is downloaded, the first compilation group encounters a 60-second timeout:

Failed to compile group 'qwen3_decode_layer_incore_1' [qwen3_decode_layer_incore_1_aic, qwen3_decode_layer_incore_1_aiv]: ptoas compilation timed out after 60s

Steps to reproduce:

  1. Download a fresh ptoas binary from PTOAS GitHub Releases (e.g. ptoas-bin-macos-aarch64.tar.gz)
  2. Extract and set PTOAS_ROOT to the extracted directory
  3. Run any compilation that invokes ptoas, e.g. python3 examples/models/qwen3/qwen3_32b_decode_tilelet.py (from pypto-lib)
  4. The first ptoas compilation group times out after 60s
  5. Re-running the same script succeeds without timeout

Workaround: Run any trivial compilation first to "warm up" ptoas, then run the actual task.

Environment

Component Version
ptoas v0.17
pypto-lib 3acde04
pypto 50a84d7 (branch: main)

Host Platform

macOS (arm64)

Additional Context

This issue is reproducible on every fresh ptoas install. The ptoas --version check also exhibits similar behavior — it times out on the first invocation (observed with a 20s timeout). This strongly suggests a one-time cold-start cost in the ptoas binary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    In Progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions