Get rid of some template arguments in GPU loop#33308
Get rid of some template arguments in GPU loop#33308zasdfgbnm wants to merge 4 commits intopytorch:masterfrom
Conversation
💊 CircleCI build failures summary and remediationsAs of commit 48ba22b:
Detailed failure analysisOne may explore the probable reasons each build failed interactively on the Dr. CI website. 🕵️ 1 new failure recognized by patternsThe following build failures do not appear to be due to upstream breakage:
|
|
test failures are unrelated |
| namespace at { namespace native { namespace modern { namespace detail { | ||
| namespace at { namespace native { | ||
|
|
||
| constexpr int num_threads = C10_WARP_SIZE * 2; |
There was a problem hiding this comment.
I assume those values are unchanged from what they used to be for ROCm? And at present we don't need to specialize them on a per-kernel basis? If so, then constexp'ing them rather than having them as template arguments makes sense.
|
cc @iotamudelta. This PR does not change any existing behavior, just makes some template arguments that were never changed into constexprs. |
facebook-github-bot
left a comment
There was a problem hiding this comment.
@ngimel has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
facebook-github-bot
left a comment
There was a problem hiding this comment.
@ngimel has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: Globally define ```C++ constexpr int num_threads = C10_WARP_SIZE * 2; constexpr int thread_work_size = 4; constexpr int block_work_size = thread_work_size * num_threads; ``` and kill all the template arguments passing these values. These are effectively global, but we are now passing them around by template arguments, causing many inconvenience in coding. Pull Request resolved: pytorch#33308 Differential Revision: D19907250 Pulled By: ngimel fbshipit-source-id: 4623b69baea7e6e77f460ffdfa07cf9f8cba588a
Globally define
and kill all the template arguments passing these values.
These are effectively global, but we are now passing them around by template arguments, causing many inconvenience in coding.