|
| 1 | += SYCL_INTEL_static_local_memory_query |
| 2 | + |
| 3 | +:source-highlighter: coderay |
| 4 | +:coderay-linenums-mode: table |
| 5 | + |
| 6 | +// This section needs to be after the document title. |
| 7 | +:doctype: book |
| 8 | +:toc2: |
| 9 | +:toc: left |
| 10 | +:encoding: utf-8 |
| 11 | +:lang: en |
| 12 | + |
| 13 | +:blank: pass:[ +] |
| 14 | + |
| 15 | +// Set the default source code type in this document to C++, |
| 16 | +// for syntax highlighting purposes. This is needed because |
| 17 | +// docbook uses c++ and html5 uses cpp. |
| 18 | +:language: {basebackend@docbook:c++:cpp} |
| 19 | + |
| 20 | +// This is necessary for asciidoc, but not for asciidoctor |
| 21 | +:cpp: C++ |
| 22 | + |
| 23 | +== Introduction |
| 24 | +IMPORTANT: This specification is a draft. |
| 25 | + |
| 26 | +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. |
| 27 | + |
| 28 | +NOTE: This document is better viewed when rendered as html with asciidoctor. GitHub does not render image icons. |
| 29 | + |
| 30 | +This document describes an extension that allows querying the amount of local memory statically allocated by a kernel. |
| 31 | + |
| 32 | +== Name Strings |
| 33 | + |
| 34 | ++SYCL_INTEL_static_local_memory_query+ |
| 35 | + |
| 36 | +== Notice |
| 37 | + |
| 38 | +Copyright (c) 2020 Intel Corporation. All rights reserved. |
| 39 | + |
| 40 | +== Status |
| 41 | + |
| 42 | +Working Draft |
| 43 | + |
| 44 | +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. |
| 45 | + |
| 46 | +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. |
| 47 | + |
| 48 | +== Version |
| 49 | + |
| 50 | +Built On: {docdate} + |
| 51 | +Revision: 1 |
| 52 | + |
| 53 | +== Contact |
| 54 | +Felipe de Azevedo Piovezan, Intel (felipe 'dot' de 'dot' azevedo 'dot' piovezan 'at' intel 'dot' com) |
| 55 | + |
| 56 | +== Dependencies |
| 57 | + |
| 58 | +This extension is written against the SYCL 1.2.1 specification, Revision 6. |
| 59 | + |
| 60 | +This extension depends on +SYCL_INTEL_device_specific_kernel_queries+. |
| 61 | + |
| 62 | +== Overview |
| 63 | + |
| 64 | +SYCL 1.2.1 already provides an API to query the amount of local memory available on |
| 65 | +devices (`device::get_info<info::device::local_mem_size>()`). This can be used as |
| 66 | +an upper bound for the amount of memory available to local accessors. However, |
| 67 | +kernel compilers are allowed to make use of local memory, effectively reducing |
| 68 | +the amount of memory available for local accessors. This extension adds a query |
| 69 | +to determine the amount of statically allocated local memory used by kernels |
| 70 | +(`kernel::get_info<info::kernel_device_specific::local_static_mem_used>(device)`). |
| 71 | + |
| 72 | +== Modifications of SYCL 1.2.1 Specification |
| 73 | + |
| 74 | +=== Add Row to Table 4.85 in Section 4.8.7 (Kernel class) |
| 75 | + |
| 76 | +==== New row: |
| 77 | + |
| 78 | +[width="40%",frame="topbot",options="header,footer"] |
| 79 | +|====================== |
| 80 | +|Kernel Device-specific Information Descriptors |Return type |Description |
| 81 | +|`info::kernel_device_specific::local_static_mem_used` | cl_ulong | Returns the minimum amount of local memory, in bytes, statically allocated in a kernel. This value may include any local memory needed by an implementation to execute the kernel, including that used by the language built-ins. |
| 82 | +|====================== |
| 83 | + |
| 84 | +== Issues |
| 85 | + |
| 86 | +None. |
| 87 | + |
| 88 | +== Revision History |
| 89 | + |
| 90 | +[cols="5,15,15,70"] |
| 91 | +[grid="rows"] |
| 92 | +[options="header"] |
| 93 | +|======================================== |
| 94 | +|Rev|Date|Author|Changes |
| 95 | +|1|2020-04-15|Felipe de Azevedo Piovezan|*Initial public working draft* |
| 96 | +|======================================== |
| 97 | + |
| 98 | +//************************************************************************ |
| 99 | +//Other formatting suggestions: |
| 100 | +// |
| 101 | +//* Use *bold* text for host APIs, or [source] syntax highlighting. |
| 102 | +//* Use +mono+ text for device APIs, or [source] syntax highlighting. |
| 103 | +//* Use +mono+ text for extension names, types, or enum values. |
| 104 | +//* Use _italics_ for parameters. |
| 105 | +//************************************************************************ |
0 commit comments