Skip to content

[ESIMD] Fix compilation errors caused by type_name() function #9092

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 18, 2023

Conversation

v-klochkov
Copy link
Contributor

@v-klochkov v-klochkov commented Apr 18, 2023

The usage of static for one of utility functions caused such warnings before: function 'esimd_test::type_name' has internal linkage
but is not defined [-Wundefined-internal]

Fixes #8934

The usage of static for one of utility functions caused such warnings before:
function 'esimd_test::type_name<unsigned long>' has internal linkage
      but is not defined [-Wundefined-internal]

Signed-off-by: Vyacheslav N Klochkov <[email protected]>
@v-klochkov v-klochkov requested a review from a team as a code owner April 18, 2023 01:59
@v-klochkov v-klochkov temporarily deployed to aws April 18, 2023 02:30 — with GitHub Actions Inactive
@v-klochkov v-klochkov temporarily deployed to aws April 18, 2023 03:01 — with GitHub Actions Inactive
@v-klochkov v-klochkov temporarily deployed to aws April 18, 2023 04:10 — with GitHub Actions Inactive
@v-klochkov v-klochkov temporarily deployed to aws April 18, 2023 10:15 — with GitHub Actions Inactive
@v-klochkov v-klochkov changed the title [ESIMD] Fix compilation warning caused by using the keyword 'static' [ESIMD] Fix compilation errors caused by type_name() function Apr 18, 2023
@v-klochkov v-klochkov temporarily deployed to aws April 18, 2023 15:40 — with GitHub Actions Inactive
@@ -568,7 +568,7 @@ std::unique_ptr<T, USMDeleter> usm_malloc_shared(queue q, int n) {
return std::move(res);
}

template <class T> static const char *type_name();
template <class T> const char *type_name() { return typeid(T).name(); }
Copy link
Contributor

Choose a reason for hiding this comment

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

If the function is defined, then likely the warning will not be issued.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, but that 'static' keyword did not seem to be needed for this template function

@v-klochkov
Copy link
Contributor Author

The fail on AMDGPU is unrelated:
SYCL :: AtomicRef/compare_exchange_generic_local.cpp

The fail in Jenkins/Precommit (ProtexIP) showed pass after restart: https://cje-fm-owrp-prod03.devtools.intel.com/satg-ce-compiler-pipelines/blue/organizations/jenkins/SYCL_CI%2Fintel%2FProtexIP/detail/ProtexIP/188/pipeline/

@v-klochkov v-klochkov merged commit 09ceb10 into intel:sycl Apr 18, 2023
@v-klochkov v-klochkov deleted the esimd_fix_warnings_win_static branch April 18, 2023 18:39
@v-klochkov v-klochkov temporarily deployed to aws April 18, 2023 22:25 — with GitHub Actions Inactive
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.

[SYCL][E2E] ESIMD/dword_atomic_* E2E tests fails on Windows
3 participants