Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
1de7ff4
Add support for uint8 and ulong.
Oct 4, 2020
ccb8d4c
A current device is always present even outside a device context.
Oct 4, 2020
3f92407
Allow program creation only for OpenCL for the time being.
Oct 4, 2020
530ae9f
Fix errors found for Sergey.
Oct 4, 2020
d6bcd74
Remove useless except+, as C++ exceptions do not cross C API.
Oct 4, 2020
4e6aabc
no need to use enum in return type
oleksandr-pavlyk Oct 5, 2020
7629342
Fixed TBB warnings on setting GPU queue
oleksandr-pavlyk Oct 5, 2020
772b97d
Rename DPPLSyclBEType to DPPLSyclBackendType. Drop superfluous enum s…
Oct 5, 2020
c4acc54
Merge branch 'feature/backend_specific_queues_v2' of github.com:dipto…
Oct 5, 2020
5d6ddc4
Reformat.
Oct 5, 2020
81dd13d
Fix formatting.
Oct 5, 2020
071a5fe
onaAPI beta10 compiler (#103)
PokhodenkoSA Oct 5, 2020
7586726
onaAPI beta10 compiler (#103)
PokhodenkoSA Oct 5, 2020
251f135
Merge pull request #93 from diptorupd/feature/backend_specific_queues_v2
diptorupd Oct 5, 2020
35c4748
Add support for uint8 and ulong.
Oct 4, 2020
1e0db44
Merge branch 'fix/issue_83' of github.com:diptorupd/dpctl into fix/is…
Oct 5, 2020
f765236
Merge branch 'diptorupd-fix/issue_83' into upstream_master
Oct 5, 2020
7f7b090
Fix/issue 83 (#96)
diptorupd Oct 5, 2020
d10f0e3
Merge branch 'master' of github.com:IntelPython/dpctl into upstream_m…
Oct 5, 2020
451ca50
Feature/get ref address (#105)
diptorupd Oct 6, 2020
bb41bb6
Rename PyDPPL to dpCtl in all visible places (#104)
PokhodenkoSA Oct 6, 2020
aaa51d3
Fix bugs highlighted by tools (#92)
PokhodenkoSA Oct 6, 2020
e351cb2
Update README.md
PokhodenkoSA Oct 6, 2020
9449986
Change cast from long to size_t (#111)
diptorupd Oct 6, 2020
9e3d086
Add changelog (#108)
1e-to Oct 6, 2020
438d620
Update CONTRIBUTING.md
diptorupd Oct 6, 2020
59fab30
Use INSTALL_PATH in cmake call
oleksandr-pavlyk Oct 6, 2020
38d9993
Merge pull request #114 from IntelPython/fix-windows-script
oleksandr-pavlyk Oct 6, 2020
49042af
Update CHANGELOG.md
diptorupd Oct 6, 2020
2e25253
Fixed typo in the code for set_default_queue (#117)
oleksandr-pavlyk Oct 8, 2020
7c311f4
Use only first device for each device type and backend (#118)
PokhodenkoSA Oct 8, 2020
9fcbaa5
Fix failing platform test case. (#116)
diptorupd Oct 8, 2020
e34ad68
Rename all pxd and pyx filenames to start with _
Oct 9, 2020
614acd4
change and fixes for existing funcs
Oct 12, 2020
f3582d9
Add device::aspects for int64_base_atomics and int64_extended_atomics
Oct 13, 2020
55a1c82
dpctl.get_current_queue is now cimportable
oleksandr-pavlyk Oct 13, 2020
e3c901d
Fixes according comments
Oct 14, 2020
19abe76
Fix tests
Oct 14, 2020
d114c8c
Use the black badge in project's README.md
PokhodenkoSA Oct 3, 2020
eb8afec
Add GitHub Actions for black
PokhodenkoSA Oct 15, 2020
6efde3d
Ignore versioneer.py from black formatting
PokhodenkoSA Oct 15, 2020
41ccd65
Format all Python code with black
PokhodenkoSA Oct 15, 2020
eadd8e5
Add ignoring revisions for blame
PokhodenkoSA Oct 15, 2020
c9ab60a
Update CONTRIBUTING.md
PokhodenkoSA Oct 15, 2020
519312f
Merge pull request #91 from PokhodenkoSA/tools/black
PokhodenkoSA Oct 15, 2020
6684c7b
Merge pull request #125 from IntelPython/expose-get-current-queue-on-…
oleksandr-pavlyk Oct 15, 2020
7a4750a
merge master
Oct 19, 2020
e509c23
Codestyle
Oct 19, 2020
245cafc
Codestyle
Oct 19, 2020
1c151b9
Some fixes + add tests for level0 gpu
Oct 21, 2020
425d841
Merge branch 'upstream_master'
Oct 21, 2020
d19a63d
Change names in tests level0gpu
Oct 22, 2020
519b077
Add flags for fixing hardening-check (#149)
PokhodenkoSA Oct 22, 2020
d8e7104
Remove OpenCL interface (#138)
1e-to Oct 23, 2020
8c4ffbb
Merge branch 'upstream_master'
Oct 23, 2020
7e5ceb3
merge master
Oct 23, 2020
6bd898d
Update changelog
Oct 23, 2020
7d548cd
fixed filename typo in setup.py to fix build
oleksandr-pavlyk Oct 23, 2020
a08c943
Merge branch 'master' into extra_device_info
PokhodenkoSA Oct 23, 2020
c26f332
Fix import _backend in _sycl_core.pxd
PokhodenkoSA Oct 23, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# $ git config blame.ignoreRevsFile .git-blame-ignore-revs

# Migrate code style to Black
41ccd65e2e659aa0add0e5ab59f1a46e32cc4c46
28 changes: 28 additions & 0 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This is a workflow to format Python code with black formatter

name: black

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [master]
pull_request:
branches: [master]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "black"
black:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Set up a Python environment for use in actions
- uses: actions/setup-python@v2

# Run black code formatter
- uses: psf/black@stable
75 changes: 75 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Changelog
All notable changes to this project will be documented in this file.

## [Unreleased]
### Added
- Device descriptors "max_compute_units", "max_work_item_dimensions", "max_work_item_sizes", "max_work_group_size", "max_num_sub_groups" and "aspects" for int64 atomics inside dpctl C API and inside the dpctl.SyclDevice class.

### Removed
- The Legacy OpenCL interface.

## [0.3.6] - 2020-10-06
### Added
- Changelog was added for dpctl.

### Fixed
- Windows build was fixed.

## [0.3.5] - 2020-10-06
### Added
- Add a helper function to all Python SyclXXX classes to get the address of the base C API pointer as a long.

### Changed
- Rename PyDPPL to dpCtl in comments (function name renaming to come later)

### Fixed
- Fix bugs highlighted by tools.
- Various code clean ups.

## [0.3.4] - 2020-10-05
### Added
- Dump functions were enhanced to print back-end information.
- dpctl gained support for unint_8 and unsigned long data types.
- oneAPI Beta 10 tool chain support was added.

### Changed
- dpctl is now aware of DPC++ Sycl PI back-ends. The functionality is now exposed via the context interface.
- C API's queue manager was refactored to require back-end.
- dpct's device_context now requires back-end, device-type, and device-id to be provided in a string format, e.g. opencl:gpu:0.

### Fixed
- Fixed some important bugs found by static analysis.

## [0.3.3] - 2020-10-02
### Added
- Add dpctl.get_curent_device_type().

## [0.3.2] - 2020-09-29
### Changed
- Set _cpu_device and _gpu_device to None by default.

## [0.3.1] - 2020-09-28
### Added
- Add get include and include headers.

### Changed
- DPPL shared objects are installed into dpctl.

### Fixed
- Refactor unit tests.

## [0.3.0] - 2020-09-23
### Added
- Adds C and Cython API for portions of Sycl queue, device, context interfaces.
- Implementing USM memory management.

### Changed
- Refactored API to expose a minimal sycl::queue interface.
- Modify cpu_queues, gpu_queues and active_queues to functions.
- Change static vectors to static pointers to verctors. It disables call for destructors. Destructors are also call in undefined order.
- Rename package PyDPPL to dpCtl.
- Use dpcpp.exe on Windows instead of dpcpp-cl.exe deleted in oneAPI beta08.

### Fixed
- Correct use ERRORLEVEL in conda scripts for Windows.
- Fix using dppl.has_sycl_platforms() and dppl.has_gpu_queues() functions in skipIf
11 changes: 9 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
Diptorup Deb
# Python code style

Todd Anderson
## black

We use [black](https://black.readthedocs.io/en/stable/) code formatter.

- Revision: `20.8b1` or branch `stable`.
- See configuration in `pyproject.toml`.

Run before each commit: `black .`
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

What?
====
A lightweight Python package exposing a subset of OpenCL and SYCL
functionalities.
A lightweight Python package exposing a subset of SYCL functionalities.

Requirements
============
Expand All @@ -27,14 +28,17 @@ On Windows to cope with [long file names](https://github.com/IntelPython/dpctl/i
```cmd
conda build --croot=C:/tmp conda-recipe
```

:warning: **You could face issues with conda-build=3.20**: Use conda-build=3.18!

3. Install conda package
```bash
conda install dpctl
```

Using PyDPPL
============
PyDPPL relies on SYCL runtime. With Intel oneAPI installed you should activate it.
Using dpCtl
===========
dpCtl relies on DPC++ runtime. With Intel oneAPI installed you should activate it.

On Windows:
```cmd
Expand Down
50 changes: 5 additions & 45 deletions backends/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.3.2 FATAL_ERROR)
project("PyDPPL - A lightweight SYCL wrapper for Python")
project("dpCtl - A lightweight SYCL wrapper for Python")

# The function checks is DPCPP_ROOT is valid and points to a dpcpp installation
function (check_for_dpcpp)
Expand Down Expand Up @@ -76,23 +76,14 @@ if(WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Qstd=c++17")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -ggdb3 -DDEBUG ")
elseif(UNIX)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} \
-Wall -Wextra -Winit-self -Wuninitialized -Wmissing-declarations \
-fdiagnostics-color=auto -O3 \
")
set(SDL_FLAGS "-fstack-protector -fstack-protector-all -fpic -fPIC -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -fno-strict-overflow -fno-delete-null-pointer-checks")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${SDL_FLAGS} -Wall -Wextra -Winit-self -Wuninitialized -Wmissing-declarations -fdiagnostics-color=auto")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -ggdb3 -DDEBUG ")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -fsycl")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SDL_FLAGS} -std=c++17 -fsycl")
else()
message(FATAL_ERROR "Unsupported system.")
endif()


set(OpenCL_INCLUDE_DIR "${DPCPP_ROOT}/include/sycl")
set(OpenCL_LIBRARY "${DPCPP_ROOT}/lib/libOpenCL.so")

message(STATUS "OpenCL_INCLUDE_DIR: ${OpenCL_INCLUDE_DIR}")
message(STATUS "OpenCL_LIBRARY: ${OpenCL_LIBRARY}")

add_library(
DPPLSyclInterface
SHARED
Expand All @@ -108,13 +99,6 @@ add_library(
source/dppl_utils.cpp
)

# Install DPPLOpenCLInterface
add_library(
DPPLOpenCLInterface
SHARED
source/dppl_opencl_interface.c
)

# Install DPPLSyclInterface
target_include_directories(
DPPLSyclInterface
Expand All @@ -124,18 +108,6 @@ target_include_directories(
${NUMPY_INCLUDE_DIR}
)

target_include_directories(
DPPLOpenCLInterface
PRIVATE
${CMAKE_SOURCE_DIR}/include/
)

target_include_directories(
DPPLOpenCLInterface
PUBLIC
${OpenCL_INCLUDE_DIR}
)

if(WIN32)
message(
STATUS
Expand All @@ -152,10 +124,6 @@ if(WIN32)
PRIVATE ${DPCPP_ROOT}/lib/sycl.lib
PRIVATE ${DPCPP_ROOT}/lib/OpenCL.lib
)
target_link_libraries(
DPPLOpenCLInterface
PRIVATE ${DPCPP_ROOT}/lib/OpenCL.lib
)
endif()

install(
Expand All @@ -165,14 +133,6 @@ install(
"${CMAKE_INSTALL_PREFIX}/lib/"
)

install(
TARGETS
DPPLOpenCLInterface
LIBRARY
DESTINATION
"${CMAKE_INSTALL_PREFIX}/lib/"
)

# Install all headers
file(GLOB HEADERS "${CMAKE_SOURCE_DIR}/include/*.h*")
foreach(HEADER ${HEADERS})
Expand All @@ -185,7 +145,7 @@ foreach(HEADER ${HEADERS})
install(FILES "${HEADER}" DESTINATION include/Support)
endforeach()

# Enable to build the PyDPPL backend test cases
# Enable to build the dpCtl backend test cases
add_subdirectory(tests)

# Todo : Add build rules for doxygen
Expand Down
2 changes: 1 addition & 1 deletion backends/include/Support/CBindingWrapping.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//===----- Support/CBindingWrapping.h - DPPL-SYCL interface --*-- C ---*---===//
//
// Python Data Parallel Processing Library (PyDPPL)
// Data Parallel Control Library (dpCtl)
//
// Copyright 2020 Intel Corporation
//
Expand Down
2 changes: 1 addition & 1 deletion backends/include/Support/DllExport.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//===---------- Support/DllExport.h - DPPL-SYCL interface ---*--- C ---*---===//
//
// Python Data Parallel Processing Library (PyDPPL)
// Data Parallel Control Library (dpCtl)
//
// Copyright 2020 Intel Corporation
//
Expand Down
2 changes: 1 addition & 1 deletion backends/include/Support/ExternC.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//===------------ Support/ExternC.h - DPPL-SYCL interface ---*--- C ---*---===//
//
// Python Data Parallel Processing Library (PyDPPL)
// Data Parallel Control Library (dpCtl)
//
// Copyright 2020 Intel Corporation
//
Expand Down
2 changes: 1 addition & 1 deletion backends/include/Support/MemOwnershipAttrs.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//===----- dppl_mem_ownership_attrs.h - DPPL-SYCL interface --*-- C++ --*--===//
//
// Python Data Parallel Processing Library (PyDPPL)
// Data Parallel Control Library (dpCtl)
//
// Copyright 2020 Intel Corporation
//
Expand Down
4 changes: 2 additions & 2 deletions backends/include/dppl_data_types.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//===---------- dppl_data_types.h - DPPL-SYCL interface ----*---- C ---*---===//
//===------------------ dppl_data_types.h - dpctl-C_API ----*---- C ---*---===//
//
// Python Data Parallel Processing Library (PyDPPL)
// Data Parallel Control Library (dpCtl)
//
// Copyright 2020 Intel Corporation
//
Expand Down
Loading