-
Notifications
You must be signed in to change notification settings - Fork 24.8k
[xpu] set aot device flags in cpp_extension #149459
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
Changes from 1 commit
d2f5fb3
406e539
ba12fbb
7157f24
f2c02e7
78de53a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -295,7 +295,7 @@ def _get_sycl_arch_list(): | |
return [] | ||
else: | ||
return ['-fsycl-targets=spir64_gen,spir64', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Moving these flags here does not seem to actually work correctly. With this change, the following 2 warnings appear. I suggest you better drop these flags from the PR and do that separately. if needed
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do these 2 warning messages appear with empty aot or non-empty aot? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These 2 warning messages don't seem to make sense to me. If the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These appear on pytorch initially built with |
||
f'-Xs "-device {\',\'.join(arch_list)}"'] | ||
f'-Xs "-device {",".join(arch_list)}"'] | ||
|
||
_SYCL_DLINK_FLAGS = [ | ||
*_COMMON_SYCL_FLAGS, | ||
|
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.
What the behavior of built extension will be if we return empty
[]
arch flags list?Secondly, is
'-fsycl-targets=spir64_gen,spir64'
still needed to be passed here?I think empty arch list worths a comment left in the source code here.
Uh oh!
There was an error while loading. Please reload this page.
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.
Compilation will still work, but without aot compilation with
ocloc
. As you mentioned in3, it won't be pre-built for any AOT target and running extension will result in runtime compilation.-fsycl-targets=spir64_gen,spir64
cannot be here, otherwiseocloc
will crash complaining no targets are set.