-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[Intel GPU] Fix Windows linkage issue due to invisible structured kernel symbols #137794
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
Conversation
…nerated kernels are decorated by TORCH_API to control the visibility, while TORCH_API is controled by the CAFFE2_BUILD_MAIN_LIB macro. Intel GPU requires the generated structure kernels to be visible for linking. Therefore, we need to define CAFFE2_BUILD_MAIN_LIB macro to enable it. [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/137794
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (1 Unrelated Failure)As of commit 9361b5a with merge base 41977a0 ( FLAKY - The following job failed but was likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
…nerated kernels are decorated by TORCH_API to control the visibility, while TORCH_API is controled by the CAFFE2_BUILD_MAIN_LIB macro. Intel GPU requires the generated structure kernels to be visible for linking. Therefore, we need to define CAFFE2_BUILD_MAIN_LIB macro to enable it. ghstack-source-id: ef0ca21 Pull Request resolved: #137794
…e structured kernel symbols" Intel GPU aten library(libtorch_xpu) utilizes `torchgen` to generate structure kernels. And the generated structure kernels are decorated by `TORCH_API` to control the visibility, while `TORCH_API` is controlled by the `CAFFE2_BUILD_MAIN_LIB` macro. https://github.com/pytorch/pytorch/blob/main/c10/macros/Export.h#L95-L99 Intel GPU requires the generated structure kernels to be visible for linking. Therefore, we need to define` CAFFE2_BUILD_MAIN_LIB` macro to enable it. [ghstack-poisoned]
…e structured kernel symbols" Intel GPU aten library(libtorch_xpu) utilizes `torchgen` to generate structure kernels. And the generated structure kernels are decorated by `TORCH_API` to control the visibility, while `TORCH_API` is controlled by the `CAFFE2_BUILD_MAIN_LIB` macro. https://github.com/pytorch/pytorch/blob/main/c10/macros/Export.h#L95-L99 Intel GPU requires the generated structure kernels to be visible for linking. Therefore, we need to define` CAFFE2_BUILD_MAIN_LIB` macro to enable it. [ghstack-poisoned]
…e structured kernel symbols" Intel GPU aten library(libtorch_xpu) utilizes `torchgen` to generate structure kernels. Currently, the generated structure kernels are decorated by `TORCH_API` to control the visibility, while `TORCH_API` is controlled by the `CAFFE2_BUILD_MAIN_LIB` macro. However, we cannot enable `CAFFE2_BUILD_MAIN_LIB` for the Intel GPU ATen library naively. Because the macro not only serves for the `TORCH_API` semantic. It means that the semantic of `TORCH_API` is symbol `hidden`. https://github.com/pytorch/pytorch/blob/main/c10/macros/Export.h#L95-L99 Therefore, we need to use ` TORCH_XPU_API` to decorate the produced structure kernels. [ghstack-poisoned]
…nerated kernels are decorated by TORCH_API to control the visibility, while TORCH_API is controled by the CAFFE2_BUILD_MAIN_LIB macro. Intel GPU requires the generated structure kernels to be visible for linking. Therefore, we need to define CAFFE2_BUILD_MAIN_LIB macro to enable it. ghstack-source-id: c153216 Pull Request resolved: #137794
…nerated kernels are decorated by TORCH_API to control the visibility, while TORCH_API is controled by the CAFFE2_BUILD_MAIN_LIB macro. Intel GPU requires the generated structure kernels to be visible for linking. Therefore, we need to define CAFFE2_BUILD_MAIN_LIB macro to enable it. ghstack-source-id: 3628a5e Pull Request resolved: #137794
…e structured kernel symbols" Intel GPU aten library(libtorch_xpu) utilizes `torchgen` to generate structure kernels. Currently, the generated structure kernels are decorated by `TORCH_API` to control the visibility, while `TORCH_API` is controlled by the `CAFFE2_BUILD_MAIN_LIB` macro. However, we cannot enable `CAFFE2_BUILD_MAIN_LIB` for the Intel GPU ATen library naively. Because the macro not only serves for the `TORCH_API` semantic. It means that the semantic of `TORCH_API` is symbol `hidden`. https://github.com/pytorch/pytorch/blob/main/c10/macros/Export.h#L95-L99 Therefore, we need to use ` TORCH_XPU_API` to decorate the produced structure kernels. [ghstack-poisoned]
…nerated kernels are decorated by TORCH_API to control the visibility, while TORCH_API is controled by the CAFFE2_BUILD_MAIN_LIB macro. Intel GPU requires the generated structure kernels to be visible for linking. Therefore, we need to define CAFFE2_BUILD_MAIN_LIB macro to enable it. ghstack-source-id: 8714c7c Pull Request resolved: #137794
…uctured kernel symbols" Intel GPU aten library(libtorch_xpu) utilizes `torchgen` to generate structure kernels. Currently, the generated structure kernels are decorated by `TORCH_API` to control the visibility, while `TORCH_API` is controlled by the `CAFFE2_BUILD_MAIN_LIB` macro. However, we cannot enable `CAFFE2_BUILD_MAIN_LIB` for the Intel GPU ATen library naively. Because the macro not only serves for the `TORCH_API` semantic. It means that the semantic of `TORCH_API` is symbol `hidden`. https://github.com/pytorch/pytorch/blob/main/c10/macros/Export.h#L95-L99 Therefore, we need to use ` TORCH_XPU_API` to decorate the produced structure kernels. [ghstack-poisoned]
…nerated kernels are decorated by TORCH_API to control the visibility, while TORCH_API is controled by the CAFFE2_BUILD_MAIN_LIB macro. Intel GPU requires the generated structure kernels to be visible for linking. Therefore, we need to define CAFFE2_BUILD_MAIN_LIB macro to enable it. ghstack-source-id: 8714c7c Pull Request resolved: #137794
# not implemented for 'Boolean' | ||
"nn.functiona.unfold": {b8}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The latest torch-xpu-ops has supported boolean
for unfolad
. Therefore, we update this case for the sake of CI.
…uctured kernel symbols" Intel GPU aten library(libtorch_xpu) utilizes `torchgen` to generate structure kernels. Currently, the generated structure kernels are decorated by `TORCH_API` to control the visibility, while `TORCH_API` is controlled by the `CAFFE2_BUILD_MAIN_LIB` macro. However, we cannot enable `CAFFE2_BUILD_MAIN_LIB` for the Intel GPU ATen library naively. Because the macro not only serves for the `TORCH_API` semantic. It means that the semantic of `TORCH_API` is symbol `hidden`. https://github.com/pytorch/pytorch/blob/main/c10/macros/Export.h#L95-L99 Therefore, we need to use ` TORCH_XPU_API` to decorate the produced structure kernels. cc voznesenskym penguinwu jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy yf225 chenyang78 kadeng muchulee8 ColinPeppler amjames desertfire chauhang [ghstack-poisoned]
…nerated kernels are decorated by TORCH_API to control the visibility, while TORCH_API is controled by the CAFFE2_BUILD_MAIN_LIB macro. Intel GPU requires the generated structure kernels to be visible for linking. Therefore, we need to define CAFFE2_BUILD_MAIN_LIB macro to enable it. ghstack-source-id: de0471e Pull Request resolved: #137794
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@pytorchbot merge |
Merge startedYour 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 |
…nel symbols (#137794) Intel GPU aten library(libtorch_xpu) utilizes `torchgen` to generate structure kernels. Currently, the generated structure kernels are decorated by `TORCH_API` to control the visibility, while `TORCH_API` is controlled by the `CAFFE2_BUILD_MAIN_LIB` macro. However, we cannot enable `CAFFE2_BUILD_MAIN_LIB` for the Intel GPU ATen library naively. Because the macro not only serves for the `TORCH_API` semantic. It means that the semantic of `TORCH_API` is symbol `hidden`. https://github.com/pytorch/pytorch/blob/main/c10/macros/Export.h#L95-L99 Therefore, we need to use ` TORCH_XPU_API` to decorate the produced structure kernels. Pull Request resolved: #137794 Approved by: https://github.com/atalman ghstack dependencies: #137873
Stack from ghstack (oldest at bottom):
Intel GPU aten library(libtorch_xpu) utilizes
torchgen
to generate structure kernels. Currently, the generated structure kernels are decorated byTORCH_API
to control the visibility, whileTORCH_API
is controlled by theCAFFE2_BUILD_MAIN_LIB
macro. However, we cannot enableCAFFE2_BUILD_MAIN_LIB
for the Intel GPU ATen library naively. Because the macro not only serves for theTORCH_API
semantic. It means that the semantic ofTORCH_API
is symbolhidden
.https://github.com/pytorch/pytorch/blob/main/c10/macros/Export.h#L95-L99
Therefore, we need to use
TORCH_XPU_API
to decorate the produced structure kernels.cc @voznesenskym @penguinwu @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @ColinPeppler @amjames @desertfire @chauhang