-
Notifications
You must be signed in to change notification settings - Fork 30
Feature/backend specific queues v2 #93
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
diptorupd
merged 24 commits into
IntelPython:master
from
diptorupd:feature/backend_specific_queues_v2
Oct 5, 2020
Merged
Changes from 17 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
c338842
rebase wih master.
576598a
Change the QueueManager API to require backend type.
diptorupd cace295
Aspects do not seem to work well in beta09. Switch to use get_info<in…
diptorupd 1edf230
Introduce the concept of sycl backends into dpctl.
diptorupd 4076520
Update dppl_sycl_queue_manager.cpp
PokhodenkoSA 425f4b9
Move the initializer for queue manager queues to separate functions.
diptorupd fa4f29a
Change how the queue manager creates the context.
diptorupd 5823125
Fix test cases.
c96c50d
Make the queue backend discoverable in sycl_core.
14bf63f
Add helper functions to get current backend.
fb1fbb2
bring back has_{cpu|gpu}_queues
4572588
Return the queue that was set as default. Helps in error checking.
99f9080
Equivalency checking helpers.
ccb8d4c
A current device is always present even outside a device context.
3f92407
Allow program creation only for OpenCL for the time being.
530ae9f
Fix errors found for Sergey.
d6bcd74
Remove useless except+, as C++ exceptions do not cross C API.
4e6aabc
no need to use enum in return type
oleksandr-pavlyk 7629342
Fixed TBB warnings on setting GPU queue
oleksandr-pavlyk 772b97d
Rename DPPLSyclBEType to DPPLSyclBackendType. Drop superfluous enum s…
c4acc54
Merge branch 'feature/backend_specific_queues_v2' of github.com:dipto…
5d6ddc4
Reformat.
81dd13d
Fix formatting.
7586726
onaAPI beta10 compiler (#103)
PokhodenkoSA File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
//===--- dppl_sycl_enum_types.h - DPPL-SYCL interface ---*---C++ -----*----===// | ||
// | ||
// Python Data Parallel Processing Library (PyDPPL) | ||
// | ||
// Copyright 2020 Intel Corporation | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
/// | ||
/// \file | ||
/// This header defines DPPL specficif enum types that wrap corresponding Sycl | ||
/// enum classes. These enums are defined primarily so that Python extensions | ||
/// that use DPPL do not have to include Sycl headers directly. | ||
/// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#pragma once | ||
|
||
#include "Support/ExternC.h" | ||
|
||
DPPL_C_EXTERN_C_BEGIN | ||
|
||
/*! | ||
* @brief Redefinition of DPC++-specific Sycl backend types. | ||
* | ||
*/ | ||
enum DPPLSyclBEType | ||
{ | ||
DPPL_UNKNOWN_BACKEND = 0x0, | ||
DPPL_OPENCL = 1 << 16, | ||
DPPL_HOST = 1 << 15, | ||
DPPL_LEVEL_ZERO = 1 << 14, | ||
DPPL_CUDA = 1 << 13 | ||
}; | ||
|
||
/*! | ||
* @brief DPPL device types that are equivalent to Sycl's device_type. | ||
* | ||
*/ | ||
enum DPPLSyclDeviceType | ||
{ | ||
DPPL_CPU = 1 << 0, | ||
DPPL_GPU = 1 << 1, | ||
DPPL_ACCELERATOR = 1 << 2, | ||
DPPL_CUSTOM = 1 << 3, | ||
DPPL_AUTOMATIC = 1 << 4, | ||
DPPL_HOST_DEVICE = 1 << 5, | ||
DPPL_ALL = 1 << 6 | ||
// IMP: before adding new values here look at DPPLSyclBEType enum. The | ||
// values should not overlap. | ||
}; | ||
|
||
/*! | ||
* @brief Supported types for kernel arguments to be passed to a Sycl kernel | ||
* using DPPL. | ||
* | ||
* \todo Add support for sycl::buffer | ||
* | ||
*/ | ||
typedef enum | ||
{ | ||
DPPL_CHAR, | ||
DPPL_SIGNED_CHAR, | ||
DPPL_UNSIGNED_CHAR, | ||
DPPL_SHORT, | ||
DPPL_INT, | ||
DPPL_UNSIGNED_INT, | ||
DPPL_LONG, | ||
DPPL_UNSIGNED_LONG, | ||
DPPL_LONG_LONG, | ||
DPPL_UNSIGNED_LONG_LONG, | ||
DPPL_SIZE_T, | ||
DPPL_FLOAT, | ||
DPPL_DOUBLE, | ||
DPPL_LONG_DOUBLE, | ||
DPPL_VOID_PTR | ||
} DPPLKernelArgType; | ||
|
||
DPPL_C_EXTERN_C_END |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.