镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

fix orchestrate plan: show kernel shapes and drop repeated what-if rows - #21

Open
Abhishek-B-R wants to merge 1 commit into
RightNow-AI:mainfrom
Abhishek-B-R:fix/orchestrate-plan-display
Open

Abhishek-B-R wants to merge 1 commit into
RightNow-AI:mainfrom
Abhishek-B-R:fix/orchestrate-plan-display

Conversation

@Abhishek-B-R

Copy link
Copy Markdown

orchestrate.py plan never shows the kernel shape. extract.py writes it under model_shape, but cmd_plan reads shape, which nothing writes, so the column is always empty.

Same command also prints each what-if line twice when the plan has 5 or fewer kernels, since min(len(kernels), 10) lands on 1, 3 or 5 again.

Repro: build a plan with extract.generate_optimization_plan for 3 kernels and run cmd_plan on it.

before
  1     matmul                                  12.00   60.0   OPTIMIZING
  If top-3 kernels achieve 1.5x -> model speedup: 1.43x
  If top-3 kernels achieve 1.5x -> model speedup: 1.43x

after
  1     matmul   M=2048, N=4096, K=4096         12.00   60.0   OPTIMIZING
  If top-3 kernels achieve 1.5x -> model speedup: 1.43x

Two line change in cmd_plan, still falls back to shape for hand written plans. Doesn't touch the time budget code that #13 changes.

extract.py writes each kernel's shape under model_shape, but cmd_plan
read a shape key that is never written, so the Shape column was always
blank. The what-if loop also listed top-N twice whenever the plan had
5 or fewer kernels, because min(len, 10) repeated 1, 3 or 5.
@Abhishek-B-R

Copy link
Copy Markdown
Author

@jaberjaber23 friendly bump: this makes orchestrate.py plan read the model_shape key that extract.py writes (falling back to shape for hand-written plans) and stops the what-if rows repeating for plans with 5 or fewer kernels. It merges cleanly with main and doesn't overlap the time-budget change in #13. Happy to adjust anything if the approach doesn't fit.

@Abhishek-B-R

Copy link
Copy Markdown
Author

@jaberjaber23 following up once more: the branch still merges cleanly with main, and it's a single commit so orchestrate.py plan reads the model_shape key that extract.py writes (falling back to shape for hand-written plans) and no longer repeats what-if rows for plans with 5 or fewer kernels. If you'd prefer a different approach, I'm happy to rework it.

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.

1 participant