Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

std::cout << "hello OneAPI" << std::endl; #3296

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 15 commits into from
Oct 5, 2022
Merged

Conversation

syurkevi
Copy link
Contributor

@syurkevi syurkevi commented Sep 22, 2022

Adds a OneAPI backend to ArrayFire. This PR is a starting point for further development and collaboration.

Description

  • Is this a new feature or a bug fix?
    New feature. New backend!
  • More detail if necessary to describe all commits in pull request.
    Lots of commits. Commits should probably be squashed. Enough scaffolding is in place to start porting kernels.
  • Why these changes are necessary.
    This should allow performant support for upcoming Intel hardware.
  • Potential impact on specific hardware, software or backends.
    This new backend may eventually need to utilize existing JIT implementations. Not sure if changes will be necessary if so.
  • Future changes not implemented in this PR.
    Sooooo many kernels need to be ported.

Changes to Users

Current source should remain unaffected when building. If new backend is targeted the icx compiler will be necessary with a command similar to:

cmake -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icx  ..

Checklist

  • Rebased on latest master
  • Code compiles
  • Tests pass
  • Functions added to unified API
  • Functions documented

@syurkevi syurkevi changed the title std::cout << "hello OneAPI" <<std std::cout << "hello OneAPI" << std::endl; Sep 22, 2022
Copy link
Member

@9prady9 9prady9 left a comment

Choose a reason for hiding this comment

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

Interesting, is this a copy of opencl backend with few fixes and commented out kernel launches ?

@@ -122,7 +122,7 @@ macro(arrayfire_set_cmake_default_variables)
set(CMAKE_PREFIX_PATH "${ArrayFire_BINARY_DIR};${CMAKE_PREFIX_PATH}")
set(BUILD_SHARED_LIBS ON)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 17)
Copy link
Member

Choose a reason for hiding this comment

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

nice

namespace afoneapi
{

#if 0
Copy link
Member

Choose a reason for hiding this comment

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

Ah, I missed this one in the first look :)

@@ -36,7 +36,8 @@ class EventBase {

/// \brief Event destructor. Calls the destroy event call on the native API
~EventBase() noexcept {
if (e_) NativeEventPolicy::destroyEvent(&e_);
//if (e_)
Copy link
Member

Choose a reason for hiding this comment

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

why leave and comment it out ?

/* Other */
#endif


Copy link
Member

Choose a reason for hiding this comment

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

This entire pragma based suppression for spdlog is better clubbed in separate header which can be resued from multiple locations in the code base which wants to use spdlog.

#else
/* Other */
#endif

Copy link
Member

Choose a reason for hiding this comment

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

Perhaps we can do the same to glad header too (like spdlog)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There's only two places it happens, perhaps a macro could work 🤔

syurkevi and others added 14 commits October 4, 2022 17:22
* afoneapi compiles and links

* Files that compile:
                      Array.cpp
                      Event.cpp
                      wrap.cpp
                      where.cpp
                      unwrap.cpp
                      triangle.cpp
                      transpose.cpp
                      transform.cpp
                      topk.cpp
                      tile.cpp
                      svd.cpp
                      susan.cpp
                      surface.cpp
                      sum.cpp
                      sparse_blas.cpp
                      sparse_arith.cpp
                      sparse.cpp
                      sort_index.cpp
                      sort.cpp
                      solve.cpp
                      sobel.cpp
                      sift.cpp
                      set.cpp
                      select.cpp
                      scan_by_key.cpp
                      scan.cpp
                      rotate.cpp
                      resize.cpp
                      reshape.cpp
                      reorder.cpp
                      regions.cpp
                      range.cpp
                      random_engine.cpp
                      qr.cpp
                      product.cpp
                      plot.cpp
                      orb.cpp
                      nearest_neighbor.cpp
                      morph.cpp
                      moments.cpp
                      min.cpp
                      memory.cpp
                      medfilt.cpp
                      meanshift.cpp
                      mean.cpp
                      max.cpp
                      platform.cpp
missing uniform random function elsewhere in arrayfire. maxdims fails
like everywhere else. gfor fails.
test Transpose/0.TranposeIP_10 takes a much longer time to run
that
    cpu. investigate
umar456
umar456 previously approved these changes Oct 5, 2022
@syurkevi syurkevi merged commit ef9898d into arrayfire:master Oct 5, 2022
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.

3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.