Skip to content

[inductor] Fix gen_transposed_tile_load_store#135307

Closed
jiayisunx wants to merge 1 commit intogh/jiayisunx/27/basefrom
gh/jiayisunx/27/head
Closed

[inductor] Fix gen_transposed_tile_load_store#135307
jiayisunx wants to merge 1 commit intogh/jiayisunx/27/basefrom
gh/jiayisunx/27/head

Conversation

@jiayisunx
Copy link
Copy Markdown
Collaborator

@jiayisunx jiayisunx commented Sep 6, 2024

Stack from ghstack (oldest at bottom):

Recent PR: #131745 bring new VLA logical in cpp codegen. And it will raise build fail error on MSVC and error code is Compiler Error C2131: https://learn.microsoft.com/en-us/cpp/error-messages/compiler-errors-1/compiler-error-c2131?view=msvc-170

reproduce UT:

pytest test\inductor\test_torchinductor_dynamic_shapes.py -v -k test_large_block_sizes_dynamic_shapes_cpu

Original generated code:

alignas(16) float tmp1[static_cast<int64_t>(((-256LL)*(c10::div_floor_integer(static_cast<int64_t>(ks1), static_cast<int64_t>(16LL)))) + (16LL*ks1))];

Changes:
allocate a large-enough fixed-sized buffer.

New genarated code:

alignas(16) float tmp1[16*16];

cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @ColinPeppler @amjames @desertfire @chauhang

[ghstack-poisoned]
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented Sep 6, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/135307

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit c54e025 with merge base 62b221d (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

jiayisunx added a commit that referenced this pull request Sep 6, 2024
ghstack-source-id: 2c96430
Pull Request resolved: #135307
@xuhancn
Copy link
Copy Markdown
Collaborator

xuhancn commented Sep 6, 2024

Test passed on Windows:

image

@jiayisunx
Copy link
Copy Markdown
Collaborator Author

@pytorchbot merge

@pytorchmergebot
Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

Chao1Han pushed a commit to Chao1Han/pytorch that referenced this pull request Sep 20, 2024
Recent PR: pytorch#131745 bring new VLA logical in cpp codegen. And it will raise build fail error on MSVC and error code is `Compiler Error C2131`: https://learn.microsoft.com/en-us/cpp/error-messages/compiler-errors-1/compiler-error-c2131?view=msvc-170

reproduce UT:
```cmd
pytest test\inductor\test_torchinductor_dynamic_shapes.py -v -k test_large_block_sizes_dynamic_shapes_cpu
```

Original generated code:
```c++
alignas(16) float tmp1[static_cast<int64_t>(((-256LL)*(c10::div_floor_integer(static_cast<int64_t>(ks1), static_cast<int64_t>(16LL)))) + (16LL*ks1))];
```

Changes:
allocate a large-enough fixed-sized buffer.

New genarated code:
```c++
alignas(16) float tmp1[16*16];
```

Pull Request resolved: pytorch#135307
Approved by: https://github.com/jgong5, https://github.com/jansel
@github-actions github-actions Bot deleted the gh/jiayisunx/27/head branch October 7, 2024 02:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants