Skip to content

[ansor] Does it reasonable to use the axis multiple times ? #17729

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
vfdff opened this issue Mar 10, 2025 · 0 comments
Open

[ansor] Does it reasonable to use the axis multiple times ? #17729

vfdff opened this issue Mar 10, 2025 · 0 comments
Labels
needs-triage PRs or issues that need to be investigated by maintainers to find the right assignees to address it type: bug

Comments

@vfdff
Copy link

vfdff commented Mar 10, 2025

Expected behavior

I expect each axis will be used only one time when it generate sketch design

Actual behavior

I try to print the sketch design in function SketchPolicyNode::SearchOneRound, we can see some axises will be used multiple times, such as i.0/j.0 in the following dump (tvm 0.19) ?

Image

turning:
Placeholder: A, B, C
for i.0 (None)
  for j.0 (None)
    for i.0 (None)
      for j.0 (None)
        for i.1 (None)
          for j.1 (None)
            for k.0 (None)
              for i.2 (None)
                for j.2 (None)
                  for k.1 (None)
                    for i.3 (None)
                      for j.3 (None)
                        matmul = ...
    for i.1 (None)
      for j.1 (None)
        out = ...

Environment (172)

Any environment details, such as: Operating System, TVM version

(/py311-tts) root@998ee80b761b:/home/zhongyunde/source/test/ansor# python -c "import tvm; print(tvm.version)"
0.19.dev0
(/py311-tts) root@998ee80b761b:/home/zhongyunde/source/test/ansor# cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.1 LTS"

Steps to reproduce

The script is get from https://tvm.hyper.ai/docs/tutorial/ops_AutoScheduling
then repeatedly run: python matmul_ansor.py

(mlir_venv) (base) root@998ee80b761b: ansor# python matmul_ansor.py
matmul_ansor.py.txt

Triage

Please refer to the list of label tags here to find the relevant tags and add them below in a bullet format (example below).

  • needs-triage
@vfdff vfdff added needs-triage PRs or issues that need to be investigated by maintainers to find the right assignees to address it type: bug labels Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage PRs or issues that need to be investigated by maintainers to find the right assignees to address it type: bug
Projects
None yet
Development

No branches or pull requests

1 participant