Skip to content

[SYCL] Deprecate ext::oneapi::sub_group #10263

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

Merged
merged 9 commits into from
Jul 13, 2023

Conversation

KornevNikita
Copy link
Contributor

sub_group extension is deprecated in favor of standard SYCL2020 sub_group.

@KornevNikita KornevNikita requested a review from againull July 7, 2023 08:57
@KornevNikita KornevNikita temporarily deployed to aws July 7, 2023 09:13 — with GitHub Actions Inactive
@KornevNikita KornevNikita temporarily deployed to aws July 7, 2023 10:22 — with GitHub Actions Inactive
@KornevNikita KornevNikita requested a review from a team as a code owner July 7, 2023 11:24
@KornevNikita KornevNikita temporarily deployed to aws July 7, 2023 11:45 — with GitHub Actions Inactive
@KornevNikita KornevNikita temporarily deployed to aws July 7, 2023 12:22 — with GitHub Actions Inactive
Copy link
Contributor

@YuriPlyakhin YuriPlyakhin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes to Joint Matrix tests look good to me.

@@ -50,7 +50,7 @@ static const char *LegalSYCLFunctions[] = {
"^sycl::_V1::multi_ptr<.+>::.+",
"^sycl::_V1::nd_item<.+>::.+",
"^sycl::_V1::group<.+>::.+",
"^sycl::_V1::sub_group<.+>::.+",
"^sycl::_V1::sub_group::.+",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't line 62 be changed?

"^sycl::_V1::ext::oneapi::sub_group::.+",

btw, did this trigger any tests fails (or found by, say, grepping)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw, did this trigger any tests fails (or found by, say, grepping)?

No, on the contrary - there were lot of ESIMD test failures locally after sub_group migration. So this change fixed these failures (honestly I don't fully know what it does, I did it some kind of randomly).

I'm not sure about the line 62. What change do you think we should do? Something like that?
"^sycl::_V1::ext::oneapi::sub_group",

Copy link
Contributor

@turinevgeny turinevgeny Jul 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw, did this trigger any tests fails (or found by, say, grepping)?

No, on the contrary - there were lot of ESIMD test failures locally after sub_group migration. So this change fixed these failures (honestly I don't fully know what it does, I did it some kind of randomly).

I'm not sure about the line 62. What change do you think we should do? Something like that? "^sycl::_V1::ext::oneapi::sub_group",

"Deprecation" shouldn't mean "removing", right, so why the tests started failing?
I do not exactly know what these regexes match, but given that the ext::oneapi::sub_group is deprecated my thinking was that line having "^sycl::_V1::ext::oneapi::sub_group::.+", should be modified (if it needs to be modified).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It turned out we don't need this change, so I restored it - 1821be2.

Probably I added it because originally I deleted ext::oneapi::sub_group class to see if there any dependencies remained and then there were ESIMD test failures.

Is it still an issue?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it still an issue?

Not for this patch, this will need to be changed when ext::oneapi::sub_group class will be deleted.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, it's still there, so I have to restore this change.

******************** TEST 'SYCL :: ESIMD/regression/globals.cpp' FAILED ********************
Script:
--
: 'RUN: at line 3';    D:/github/_work/llvm/llvm/install/bin/clang++.exe   -fsycl -fsycl-targets=spir64 D:\github\_work\llvm\llvm\llvm\sycl\test-e2e\ESIMD\regression\globals.cpp -o D:\github\_work\llvm\llvm\build-e2e\ESIMD\regression\Output\globals.cpp.tmp.out
: 'RUN: at line 4';   env ONEAPI_DEVICE_SELECTOR=ext_oneapi_level_zero:gpu  D:\github\_work\llvm\llvm\build-e2e\ESIMD\regression\Output\globals.cpp.tmp.out
--
Exit Code: 1

Command Output (stdout):
--
$ ":" "RUN: at line 3"
$ "D:/github/_work/llvm/llvm/install/bin/clang++.exe" "-fsycl" "-fsycl-targets=spir64" "D:\github\_work\llvm\llvm\llvm\sycl\test-e2e\ESIMD\regression\globals.cpp" "-o" "D:\github\_work\llvm\llvm\build-e2e\ESIMD\regression\Output\globals.cpp.tmp.out"
# command stderr:
error: function 'sycl::_V1::sub_group::get_local_id() const' is not supported in ESIMD context
error: function 'sycl::_V1::sub_group::get_local_range() const' is not supported in ESIMD context
error: function 'sycl::_V1::sub_group::get_max_local_range() const' is not supported in ESIMD context
error: function 'sycl::_V1::sub_group::get_local_id() const' is not supported in ESIMD context
error: function 'sycl::_V1::sub_group::get_local_range() const' is not supported in ESIMD context
error: function 'sycl::_V1::sub_group::get_max_local_range() const' is not supported in ESIMD context
error: function 'sycl::_V1::sub_group::get_local_id() const' is not supported in ESIMD context
error: function 'sycl::_V1::sub_group::get_local_range() const' is not supported in ESIMD context
error: function 'sycl::_V1::sub_group::get_max_local_range() const' is not supported in ESIMD context
9 errors generated.

error: command failed with exit status: 1

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please explain these failures? Tests should not regress due to deprecating a class. Is there another cause?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess tests fail because they now using sycl::sub_group::method name, not sycl::ext::oneapi::sub_group::method_name. I not only deprecated this class, I also replaced all uses of old sub_group by the new one. I think this is the issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And it looks like this "^sycl::_V1::sub_group<.+>::.+", signature isn't correct

Copy link
Contributor

@AlexeySachkov AlexeySachkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@intel/sycl-language-enabling-triage: FYI

@KornevNikita KornevNikita temporarily deployed to aws July 10, 2023 18:12 — with GitHub Actions Inactive
@KornevNikita KornevNikita temporarily deployed to aws July 10, 2023 18:55 — with GitHub Actions Inactive
@KornevNikita KornevNikita temporarily deployed to aws July 11, 2023 16:02 — with GitHub Actions Inactive
Copy link
Contributor

@turinevgeny turinevgeny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM for ESIMD.

@KornevNikita KornevNikita temporarily deployed to aws July 11, 2023 16:46 — with GitHub Actions Inactive
@KornevNikita KornevNikita temporarily deployed to aws July 12, 2023 09:05 — with GitHub Actions Inactive
@KornevNikita KornevNikita temporarily deployed to aws July 12, 2023 09:51 — with GitHub Actions Inactive
@KornevNikita KornevNikita temporarily deployed to aws July 12, 2023 10:24 — with GitHub Actions Inactive
@KornevNikita KornevNikita temporarily deployed to aws July 12, 2023 12:10 — with GitHub Actions Inactive
@KornevNikita
Copy link
Contributor Author

Failure is unrelated #10324

@againull againull merged commit 0662e2a into intel:sycl Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants