Skip to content

[SYCL] Make backend a property of a platform #9153

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 5 commits into from
Apr 25, 2023

Conversation

smaslov-intel
Copy link
Contributor

No description provided.

@smaslov-intel smaslov-intel requested review from a team as code owners April 21, 2023 02:44
@smaslov-intel smaslov-intel temporarily deployed to aws April 21, 2023 03:19 — with GitHub Actions Inactive
@smaslov-intel smaslov-intel temporarily deployed to aws April 21, 2023 06:47 — with GitHub Actions Inactive
Copy link
Contributor

@steffenlarsen steffenlarsen left a comment

Choose a reason for hiding this comment

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

Good stuff! This looks much cleaner.

@smaslov-intel smaslov-intel temporarily deployed to aws April 22, 2023 00:37 — with GitHub Actions Inactive
@smaslov-intel smaslov-intel temporarily deployed to aws April 22, 2023 01:30 — with GitHub Actions Inactive
@smaslov-intel smaslov-intel temporarily deployed to aws April 22, 2023 03:07 — with GitHub Actions Inactive
@smaslov-intel smaslov-intel temporarily deployed to aws April 22, 2023 04:53 — with GitHub Actions Inactive
Signed-off-by: Sergey V Maslov <sergey.v.maslov@intel.com>
Signed-off-by: Sergey V Maslov <sergey.v.maslov@intel.com>
Signed-off-by: Sergey V Maslov <sergey.v.maslov@intel.com>
Signed-off-by: Sergey V Maslov <sergey.v.maslov@intel.com>
Signed-off-by: Sergey V Maslov <sergey.v.maslov@intel.com>
@smaslov-intel smaslov-intel temporarily deployed to aws April 25, 2023 00:10 — with GitHub Actions Inactive
@smaslov-intel smaslov-intel temporarily deployed to aws April 25, 2023 03:09 — with GitHub Actions Inactive
@smaslov-intel
Copy link
Contributor Author

@intel/llvm-gatekeepers: please merge.
The CUDA failure is unrelated and is tracked here: #9174

Failed Tests (1):
SYCL :: Regression/same_unnamed_kernels.cpp

@FreddyLeaf
Copy link
Contributor

I saw a build fail after this patch:

llvm/sycl/unittests/pi/BackendString.hpp:20:10: error: returning address of local temporary object [-Werror,-Wreturn-stack-address]
  return Str.str().c_str();
         ^~~~~~~~~

@FreddyLeaf
Copy link
Contributor

I saw a build fail after this patch:

llvm/sycl/unittests/pi/BackendString.hpp:20:10: error: returning address of local temporary object [-Werror,-Wreturn-stack-address]
  return Str.str().c_str();
         ^~~~~~~~~

Hello, could any of you help resolve this? Thanks a lot!

@smaslov-intel
Copy link
Contributor Author

I saw a build fail after this patch:

llvm/sycl/unittests/pi/BackendString.hpp:20:10: error: returning address of local temporary object [-Werror,-Wreturn-stack-address]
  return Str.str().c_str();
         ^~~~~~~~~

Hello, could any of you help resolve this? Thanks a lot!

What build is failing?

@FreddyLeaf
Copy link
Contributor

I saw a build fail after this patch:

llvm/sycl/unittests/pi/BackendString.hpp:20:10: error: returning address of local temporary object [-Werror,-Wreturn-stack-address]
  return Str.str().c_str();
         ^~~~~~~~~

Hello, could any of you help resolve this? Thanks a lot!

What build is failing?

I think it's with -Werror,-Wreturn-stack-address when building check-all

@againull
Copy link
Contributor

I saw a build fail after this patch:

llvm/sycl/unittests/pi/BackendString.hpp:20:10: error: returning address of local temporary object [-Werror,-Wreturn-stack-address]
  return Str.str().c_str();
         ^~~~~~~~~

Hello, could any of you help resolve this? Thanks a lot!

What build is failing?

I think the build with -Werror will fail. In any case, this looks like a real bug, in the code indeed C string is returned which is going to be freed after end of scope of this function (when std::stringstream Str; is destructed).

@smaslov-intel smaslov-intel deleted the backend branch April 27, 2023 03:23
@smaslov-intel
Copy link
Contributor Author

I saw a build fail after this patch:

llvm/sycl/unittests/pi/BackendString.hpp:20:10: error: returning address of local temporary object [-Werror,-Wreturn-stack-address]
  return Str.str().c_str();
         ^~~~~~~~~

Hello, could any of you help resolve this? Thanks a lot!

What build is failing?

I think the build with -Werror will fail. In any case, this looks like a real bug, in the code indeed C string is returned which is going to be freed after end of scope of this function (when std::stringstream Str; is destructed).

I know and fixing in https://github.com/intel/llvm/pull/9232/files#diff-bdd3b8fe78c5f95c7ee4d61de34a1123646835047a2d0c5f85124d02655c4ce1

Just wanted to know how to test locally.

@FreddyLeaf
Copy link
Contributor

I saw a build fail after this patch:

llvm/sycl/unittests/pi/BackendString.hpp:20:10: error: returning address of local temporary object [-Werror,-Wreturn-stack-address]
  return Str.str().c_str();
         ^~~~~~~~~

Hello, could any of you help resolve this? Thanks a lot!

What build is failing?

I think the build with -Werror will fail. In any case, this looks like a real bug, in the code indeed C string is returned which is going to be freed after end of scope of this function (when std::stringstream Str; is destructed).

I know and fixing in https://github.com/intel/llvm/pull/9232/files#diff-bdd3b8fe78c5f95c7ee4d61de34a1123646835047a2d0c5f85124d02655c4ce1

Just wanted to know how to test locally.

Thanks for fixing!

@FreddyLeaf
Copy link
Contributor

FYI it is my second time reporting similar fails under -werror=on, last fix is #9130

againull pushed a commit to againull/llvm that referenced this pull request May 1, 2023
againull added a commit that referenced this pull request May 1, 2023
…rm (#9153) (#9272)

Co-authored-by: Sergey Maslov <sergey.v.maslov@intel.com>
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.

5 participants