Skip to content

Latest commit

 

History

History
100 lines (70 loc) · 3.64 KB

sycl_ext_intel_buffer_location.asciidoc

File metadata and controls

100 lines (70 loc) · 3.64 KB

SYCL_INTEL_buffer_location

Introduction

Important
This specification is a draft.
Note
Khronos® is a registered trademark and SYCL™ and SPIR™ are trademarks of The Khronos Group Inc. OpenCL™ 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 that adds a compile-time-constant property to tell the SYCL device compiler and runtime in which memory a particular accessor should be allocated. This is useful on targets that possess more than one type of global memory.

Name Strings

SYCL_INTEL_buffer_location

Contributors

Joe Garvey, Intel

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: 2024-06-28
Revision: 1

Contact

Michael Kinsner, Intel (michael 'dot' kinsner 'at' intel 'dot' com)

Dependencies

This extension is written against the SYCL 2020 pre-provisional specification and the SYCL_INTEL_accessor_properties extension.

The use of this extension requires a target that supports SPV_INTEL_fpga_buffer_location if SPIR-V is used as the intermediate representation.

Overview

On targets that provide more than one type of global memory, knowing that a particular pointer can only access one of those memory types at compile time can enable compiler optimizations. This extension adds an accessor property to indicate to the runtime in which of these memories the buffer corresponding to this accessor should be allocated and to inform the compiler that all accesses made through that accessor can only ever interact with the given memory. This information is not a hint; it is a functional requirement of the program that must be respected.

Modifications to the SYCL 2020 Pre-Provisional Specification

Section 4.7.6.9.2 Device buffer accessor properties

Add a new property and global variable to the listing:

namespace sycl {
...
namespace ext {
namespace intel {
namespace property {
    struct buffer_location {
        template<int>
        /* unspecified class to represent buffer location instances */
    };
} // namespace property
    template<int I>
    inline constexpr /* buffer location instance class */<I> buffer_location;
} // namespace intel
} // namespace ext
} // namespace sycl

Add a new row to Table 4.50: Properties supported by the SYCL accessor class:

Property Description Compile-time Constant
property::buffer_location

The buffer_location property notifies the SYCL device compiler that the given accessor will only ever point to the memory identified by the int template parameter of its instance class. It also notifies the SYCL runtime to store the given accessor in that memory. This property is meaningful only when the kernel is submitted to a device that has more than one type of global memory (e.g. an FPGA). When a kernel using this property is submitted to a different device, the property is ignored.

Yes

Issues

Revision History

Rev Date Author Changes

1

2020-09-08

Joe Garvey

Initial public draft