Skip to content

[ESIMD] Overloading sycl sin,cos,exp,log functions for ESIMD arguments #3717

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 3 commits into from
Jun 16, 2021

Conversation

DenisBakhvalov
Copy link
Contributor

No description provided.

@DenisBakhvalov DenisBakhvalov requested a review from kbobrovs May 8, 2021 06:39
@DenisBakhvalov DenisBakhvalov requested a review from a team as a code owner May 8, 2021 06:39
@DenisBakhvalov
Copy link
Contributor Author

The test is here: intel/llvm-test-suite#312

@DenisBakhvalov DenisBakhvalov force-pushed the sycl_esimd-vectorize5 branch 2 times, most recently from 5767974 to b7c2dc9 Compare June 4, 2021 23:24
Copy link
Contributor

@kbobrovs kbobrovs left a comment

Choose a reason for hiding this comment

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

Looks like I did not hit "submit" the first time :(

#include <sycl/ext/intel/experimental/esimd/detail/math_intrin.hpp>

// TODO Decide whether to mark functions with this attribute.
#define __NOEXC /*noexcept*/
Copy link
Contributor

Choose a reason for hiding this comment

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

I think for device it should be noexcept, as for all device functions, for host - same as usual SYCL host.

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 copied it from builtins.hpp.

#endif // __SYCL_DEVICE_ONLY__
}

ESIMD_NODEBUG ESIMD_INLINE __ESIMD_NS::simd<float, 1>
Copy link
Contributor

Choose a reason for hiding this comment

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

not clear why this specialization is needed?

Copy link
Contributor

Choose a reason for hiding this comment

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

?

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 couldn't remember why I added it. But it looks like now it's not needed. I deleted it.

__SYCL_INLINE_NAMESPACE(cl) {
namespace sycl {

#define __ESIMD_NS ext::intel::experimental::esimd
Copy link
Contributor

Choose a reason for hiding this comment

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

this one is already defined:
sycl/include/sycl/ext/intel/experimental/esimd/common.hpp:#define __ESIMD_NS sycl::ext::intel::experimental::esimd

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@DenisBakhvalov DenisBakhvalov force-pushed the sycl_esimd-vectorize5 branch from b7c2dc9 to 003eea7 Compare June 11, 2021 22:55
Copy link
Contributor

@kbobrovs kbobrovs left a comment

Choose a reason for hiding this comment

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

please add E2E tests also

@kbobrovs
Copy link
Contributor

@DenisBakhvalov, I suggest to change the title for more clarity - this is really overloading sycl:: functions for ESIMD arguments.

@kbobrovs
Copy link
Contributor

@bader - please review. This overloading approach was agreed upon with @rolandschulz and @Pennycook.

@dm-vodopyanov dm-vodopyanov self-requested a review June 15, 2021 17:35
@DenisBakhvalov
Copy link
Contributor Author

please add E2E tests also

E2E tests are here: intel/llvm-test-suite#312

@DenisBakhvalov DenisBakhvalov changed the title [ESIMD] Implement ESIMD sin,cos,exp,log functions using scalar versions [ESIMD] Overloading sycl sin,cos,exp,log functions for ESIMD arguments Jun 15, 2021
@kbobrovs
Copy link
Contributor

@bader, @alexbatashev, @v-klochkov or other folks from rt reviewers - please approve

@kbobrovs kbobrovs merged commit e8c32cb into intel:sycl Jun 16, 2021
alexbatashev pushed a commit to alexbatashev/llvm that referenced this pull request Jun 18, 2021
* upstream/sycl: (776 commits)
  Align CMake requirements with upstream. (intel#3928)
  [SYCL] Deprecate [[intel::reqd_work_group_size]] attribute spelling (intel#3927)
  [SYCL] Fix post commit after PR 2292 (intel#3939)
  {SYCL][PI][L0] - Eliminate std::string construction/destruction overhead. (intel#3931)
  [ESIMD] Overloading sycl sin,cos,exp,log functions for ESIMD arguments (intel#3717)
  [sycl-post-link] Add device image property for assert feature (intel#3881)
  [SYCL] Split read/write lockings (intel#2292)
  Handle OpSpecConstantOp with Select
  Handle OpSpecConstantOp with SMod
  Add tests for SConvert, UConvert, BitCast OpSpecConstantOp
  Fix attachment of decoration to spec constants
  Implement support for dynamic memmove
  Align clang-tidy/format versions to LLVM version
  Handle OpSpecConstantOp for integer comparisons
  Handle OpSpecConstantOp for SNegate, Not, and LogicalNot
  Extend OpSpecConstantOp testing for initializers
  Use IRBuilder for folding
  Fix translating of compile unit
  Support buffers in LinalgFoldUnitExtentDims
  [gn build] Port d0a5d86
  ...
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.

4 participants