Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
Add dpctl.program to API doc.
  • Loading branch information
Diptorup Deb
Diptorup Deb committed Dec 16, 2020
commit 662b7bdaac6412f65128d2d12f0d6039b87fd0dd
8 changes: 8 additions & 0 deletions docs/dpCtl.program_api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.. _dpCtl.program_api:

########################
dpCtl Program Python API
########################

.. automodule:: dpctl.program
:members:
3 changes: 2 additions & 1 deletion docs/toc_pyapi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ Python API
:maxdepth: 1

SYCL runtime wrapper classes and queue manager <dpCtl_api>
SYCL USM memory manager <dpCtl.memory_api>
USM memory manager <dpCtl.memory_api>
Program manager <dpCtl.program_api>
2 changes: 2 additions & 0 deletions dpctl/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# ===-----------------------------------------------------------------------===#
# Data Parallel Control (dpCtl)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This line is also need to support in the future.
I would like to have only license at the header and minimum decorations.

#
# Copyright 2020 Intel Corporation
Expand All @@ -14,6 +15,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# ===-----------------------------------------------------------------------===#

"""
**Data Parallel Control (dpCtl)**
Expand Down
4 changes: 2 additions & 2 deletions dpctl/_sycl_core.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ cdef class _SyclRTManager:
def _remove_current_queue(self):
DPCTLQueueMgr_PopQueue()

def dump (self):
def dump(self):
""" Prints information about the Runtime object.
"""
DPCTLPlatform_DumpInfo()
Expand Down Expand Up @@ -816,7 +816,7 @@ cpdef get_current_backend():
from contextlib import contextmanager

@contextmanager
def device_context (str queue_str="opencl:gpu:0"):
def device_context(str queue_str="opencl:gpu:0"):
"""
The SYCL queue defined by the "backend:device type:device id" tuple is
set as the currently active queue, *i.e.*, a subsequent call to
Expand Down
31 changes: 31 additions & 0 deletions dpctl/dptensor/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,32 @@
# ===-----------------------------------------------------------------------===#
# Data Parallel Control (dpCtl)
#
# 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.
#
# ===-----------------------------------------------------------------------===#
"""
**Data Parallel Tensor Collection**

`dpctl.dptensor` is an experimental collection of tensor implementations
that will implement future Python data API (https://data-apis.github.io/array-api/latest/).

Available tensor implementations:

* `numpy_usm_shared`: Provides a `numpy.ndarray` sub-class whose
underlying memory buffer is allocated with a USM shared memory allocator.

"""

import dpctl.dptensor.numpy_usm_shared