-
Notifications
You must be signed in to change notification settings - Fork 44
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
Port and run tests in python/test/unit/tools #2953
base: main
Are you sure you want to change the base?
Conversation
Compile support Link support gen bin success, but x1 hangs todo:segfault fix fix Enable Clean
python/test/unit/tools/test_aot.py
Outdated
cwd=dir, | ||
) | ||
o_files = glob.glob(os.path.join(dir, "*.o")) | ||
if is_cuda(): |
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.
May be to minimize changes and simplify future potential merges
if is_cuda(): | |
if is_xpu(): | |
gen_kernel_library_xpu(dir, libname) |
and keep the rest of the function as the original?
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.
Thanks for review. Changed in f6aaed5
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.
I think there are opportunities in this PR to remove some changes to make the code less divergent from upstream
@@ -132,27 +134,46 @@ def gen_signature(m): | |||
|
|||
# generate declarations of kernels with meta-parameter and constant values | |||
def make_algo_decls(name: str, metas: Sequence[KernelLinkerMeta]) -> str: | |||
return f""" | |||
if is_cuda(): |
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.
Can we remove the check is_cuda()
?
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.
No, return wrong source string for xpu if removed.
|
||
|
||
# generate declarations of kernels with meta-parameter and constant values | ||
def make_global_decl(meta: KernelLinkerMeta) -> str: | ||
return f""" | ||
if is_cuda(): |
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.
Can we remove the check is_cuda()
?
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.
same reason
@whitneywhtsang are you OK with these changes? |
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.
can the two new files be moved to third_party/intel?
Done |
Thanks, maybe cleaner to put them in a folder, like |
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.
Can this change be upstreamed?
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.
I think we can try. The change puts the backend templates in the corresponding location instead of the public folder, looks reasonable.
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.
I agree, please give that a try.
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.
All cases pass except for
tools/test_aot.py::test_compile_link_matmul_no_specialization SKIPPED (FIXME: AssertionError on XPU
-> #2967