Skip to content

Commit

Permalink
Merge from 'sycl' to 'sycl-web' (triSYCL#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
iclsrc committed Apr 20, 2020
2 parents 2295e1d + 4c07ff8 commit 5797b8c
Show file tree
Hide file tree
Showing 8 changed files with 165 additions and 107 deletions.
1 change: 1 addition & 0 deletions llvm/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ set(LLVM_TEST_DEPENDS
UnitTests
bugpoint
count
file-table-tform
llc
lli
lli-child-target
Expand Down
2 changes: 1 addition & 1 deletion llvm/tools/file-table-tform/LLVMBuild.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
type = Tool
name = file-table-tform
parent = Tools
required_libraries =
required_libraries = Support
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
= SYCL_INTEL_device_specific_kernel_queries

:source-highlighter: coderay
:coderay-linenums-mode: table

// This section needs to be after the document title.
:doctype: book
:toc2:
:toc: left
:encoding: utf-8
:lang: en

:blank: pass:[ +]

// Set the default source code type in this document to C++,
// for syntax highlighting purposes. This is needed because
// docbook uses c++ and html5 uses cpp.
:language: {basebackend@docbook:c++:cpp}

// This is necessary for asciidoc, but not for asciidoctor
:cpp: C++

== Introduction
IMPORTANT: This specification is a draft.

NOTE: Khronos(R) is a registered trademark and SYCL(TM) and SPIR(TM) are
trademarks of The Khronos Group Inc. OpenCL(TM) is a trademark of Apple Inc.
used by permission by Khronos.

NOTE: This document is better viewed when rendered as html with asciidoctor.
GitHub does not render image icons.

This document describes an extension to rename device-specific kernel queries
to better describe the operations performed.

== Name Strings

+SYCL_INTEL_device_specific_kernel_queries+

== Notice

Copyright (c) 2020 Intel Corporation. All rights reserved.

== Status

Working Draft

This is a preview extension specification, intended to provide early access to
a feature for review and community feedback. When the feature matures, this
specification may be released as a formal extension.

Because the interfaces defined by this specification are not final and are
subject to change they are not intended to be used by shipping software
products.

== Version

Built On: {docdate} +
Revision: 1

== Contact
Felipe de Azevedo Piovezan, Intel (felipe 'dot' de 'dot' azevedo 'dot' piovezan 'at' intel 'dot' com)

== Dependencies

This extension is written against the SYCL 1.2.1 specification, Revision 6.

== Overview

OpenCL provides two functions for querying properties of a kernel:
`clGetKernelInfo` is used for kernel properties that are device agnostic,
whereas `clGetKernelWorkGroupInfo` is used for kernel and work-group properties
that depend on a specific device. The name `clGetKernelWorkGroupInfo` doesn't
convey the API's intended use explicitly, that is, queries for
*device-specific* properties. In this sense, `clGetKernelWorkGroupInfo` is a
misnomer for some uses of the API.

SYCL inherited these names in the form of the queries `kernel::get_info` and
`kernel::get_work_group_info`. This extension renames the latter (and its
template arguments as appropriate) in order to align the query name with its
functionality.

== Modifications of SYCL 1.2.1 Specification

=== Change Section 4.8.7 Kernel class

==== Change `kernel` class interface

Remove lines 29-31 (inclusive) from the `kernel` class interface:

[source,c++,`sycl::kernel`,linenums]
----
template <info::kernel_work_group param>
typename info::param_traits<info::kernel_work_group, param>::return_type
get_work_group_info(const device &dev) const;
----

Add function overload `get_info` to the `kernel` class interface:

[source,c++,`sycl::kernel`,linenums]
----
template <info::kernel_device_specific param>
typename info::param_traits<info::kernel_device_specific, param>::return_type
get_info(const device &dev) const;
----

==== Change table 4.83 Member functions of the Kernel class

Remove row `get_work_group_info(const device &dev)`:

[width="40%",frame="topbot",options="header,footer"]
|======================
|Member functions |Description
|`template <info::kernel_work_group param>typename info::param_traits<info::kernel_work_group, param>::return_type get_work_group_info(const device &dev)const` |
Query information from the work-group from a kernel using the info::kernel_work_group descriptor for a specific device
|======================

Add row `get_info(const device &dev)`:

[width="40%",frame="topbot",options="header,footer"]
|======================
|Member functions |Description
|`template <info::kernel_device_specific param>typename info::param_traits<info::kernel_device_specific, param>::return_type get_info(const device &dev)const` |
Query information from a kernel using the info::kernel_device_specific descriptor for a specific device.
|======================

==== Change table 4.85 Kernel work-group information descriptors

Rename table to: +Kernel device-specific information descriptors+.

Replace all references to `info::kernel_work_group` with
`info::kernel_device_specific`.

==== Change A.5 Kernel Information Descriptors

Rename `enum class kernel_work_group: int` to `enum class
kernel_device_specific: int`.

== Issues

None.

== Revision History

[cols="5,15,15,70"]
[grid="rows"]
[options="header"]
|========================================
|Rev|Date|Author|Changes
|1|2020-04-15|Felipe de Azevedo Piovezan|*Initial public working draft*
|========================================

//************************************************************************
//Other formatting suggestions:
//
//* Use *bold* text for host APIs, or [source] syntax highlighting.
//* Use +mono+ text for device APIs, or [source] syntax highlighting.
//* Use +mono+ text for extension names, types, or enum values.
//* Use _italics_ for parameters.
//************************************************************************
100 changes: 0 additions & 100 deletions sycl/include/CL/sycl/detail/clusm.hpp

This file was deleted.

6 changes: 3 additions & 3 deletions sycl/include/CL/sycl/detail/pi.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ using PiMemObjectType = ::pi_mem_type;
using PiMemImageChannelOrder = ::pi_image_channel_order;
using PiMemImageChannelType = ::pi_image_channel_type;

void contextSetExtendedDeleter(const cl::sycl::context &constext,
pi_context_extended_deleter func,
void *user_data);
__SYCL_EXPORT void contextSetExtendedDeleter(const cl::sycl::context &constext,
pi_context_extended_deleter func,
void *user_data);

// Function to load the shared library
// Implementation is OS dependent.
Expand Down
1 change: 0 additions & 1 deletion sycl/source/detail/context_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
//
// ===--------------------------------------------------------------------=== //

#include <CL/sycl/detail/clusm.hpp>
#include <CL/sycl/detail/common.hpp>
#include <CL/sycl/detail/cuda_definitions.hpp>
#include <CL/sycl/detail/pi.hpp>
Expand Down
1 change: 0 additions & 1 deletion sycl/source/detail/queue_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//

#include <CL/sycl/context.hpp>
#include <CL/sycl/detail/clusm.hpp>
#include <CL/sycl/detail/memory_manager.hpp>
#include <CL/sycl/detail/pi.hpp>
#include <CL/sycl/device.hpp>
Expand Down
1 change: 0 additions & 1 deletion sycl/source/detail/scheduler/commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

#include "CL/sycl/access/access.hpp"
#include <CL/cl.h>
#include <CL/sycl/detail/clusm.hpp>
#include <CL/sycl/detail/kernel_desc.hpp>
#include <CL/sycl/detail/memory_manager.hpp>
#include <CL/sycl/detail/stream_impl.hpp>
Expand Down

0 comments on commit 5797b8c

Please sign in to comment.