Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SYCL] Initial changes for C++11 ABI=0 support #12193

Merged
merged 115 commits into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from 112 commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
2d34c19
[SYCL] Initial change for C++11 ABI=0 support
bso-intel Dec 15, 2023
4dabfd3
clang-format fix
bso-intel Dec 15, 2023
108bf4d
Merge remote-tracking branch 'upstream/sycl' into abi
bso-intel Dec 15, 2023
d7f21ab
clang-format
bso-intel Dec 15, 2023
34cd0b9
format
bso-intel Dec 15, 2023
ded92db
fix mockup
bso-intel Dec 15, 2023
77aaeba
fix test
bso-intel Dec 15, 2023
fa6a931
fix test
bso-intel Dec 15, 2023
5709e28
fix test
bso-intel Dec 15, 2023
da8ab9f
address feedback
bso-intel Jan 4, 2024
841f042
clang-format
bso-intel Jan 4, 2024
a79d58f
guard preview-break-changes
bso-intel Jan 9, 2024
74bb97d
Update sycl/include/sycl/platform.hpp
bso-intel Jan 10, 2024
7cebd8d
guard
bso-intel Jan 10, 2024
20448f7
added comments
bso-intel Jan 11, 2024
95f48f8
adjusted comment
bso-intel Jan 11, 2024
f0aa89c
added support for get_kernel_id
bso-intel Jan 17, 2024
a1e4479
changed param type to reference
bso-intel Jan 23, 2024
312cda8
clang-format
bso-intel Jan 23, 2024
1db3ca8
separate string and string_view
bso-intel Jan 23, 2024
d83490d
address feedback
bso-intel Jan 24, 2024
273f4b0
removed marshall
bso-intel Jan 24, 2024
ac1ee03
address feedback
bso-intel Jan 24, 2024
436288b
fixed typo in comments
bso-intel Jan 24, 2024
84f8e2d
fixed again
bso-intel Jan 24, 2024
db67a87
address feedback
bso-intel Jan 25, 2024
66c0405
Update sycl/include/sycl/detail/string.hpp
bso-intel Jan 25, 2024
4823b25
Update sycl/include/sycl/detail/string.hpp
bso-intel Jan 25, 2024
cff7fae
remove
bso-intel Jan 25, 2024
3af523e
remove
bso-intel Jan 25, 2024
f918818
fix string_view
bso-intel Jan 25, 2024
316627a
address feedback
bso-intel Jan 25, 2024
741db80
include
bso-intel Jan 25, 2024
2db4e56
Update sycl/include/sycl/detail/string.hpp
bso-intel Jan 26, 2024
22a59c6
address feedback
bso-intel Jan 26, 2024
4e28f9f
address feedback
bso-intel Jan 31, 2024
e24da9c
missed char
bso-intel Jan 31, 2024
f707404
Merge branch 'sycl' into abi
bso-intel Jan 31, 2024
272e400
support return vec
bso-intel Feb 1, 2024
67ecf71
address feedback
bso-intel Feb 1, 2024
e385649
address feedback again
bso-intel Feb 5, 2024
8a9aaaf
pass std::string_view by value
bso-intel Feb 5, 2024
2adf0fb
more feedback
bso-intel Feb 6, 2024
a309a8d
ref removed
bso-intel Feb 6, 2024
537491d
fix
bso-intel Feb 6, 2024
8fc92b8
remove refs
bso-intel Feb 6, 2024
f9a9af4
return empty string
bso-intel Feb 6, 2024
0aa4158
default move
bso-intel Feb 7, 2024
b51cb8a
Update sycl/include/sycl/detail/string_view.hpp
bso-intel Feb 7, 2024
6e7da0a
feedback addressed
bso-intel Feb 7, 2024
05a0ca1
support exception
bso-intel Feb 8, 2024
ecb8ce9
Update sycl/include/sycl/handler.hpp
bso-intel Feb 9, 2024
6f36028
more feedback addressed
bso-intel Feb 9, 2024
f4655aa
fix get_info
bso-intel Feb 10, 2024
a04fc0c
fix platform prop
bso-intel Feb 11, 2024
a803e6d
replace string with enum
bso-intel Feb 12, 2024
a22fd4a
variant return struct
bso-intel Feb 13, 2024
429c7a3
fix errors
bso-intel Feb 14, 2024
b18eb02
added missing declaration
bso-intel Feb 14, 2024
4f0d634
fixed return type
bso-intel Feb 14, 2024
9d9cf42
cleanup comments
bso-intel Feb 14, 2024
921b754
silence the return type error
bso-intel Feb 14, 2024
bf313f1
fixed undefined reference
bso-intel Feb 14, 2024
32a0401
fixed undefined refs
bso-intel Feb 14, 2024
431ac8d
use template
bso-intel Feb 14, 2024
a4c2ffa
fix platform template
bso-intel Feb 15, 2024
273248b
fix duplicate
bso-intel Feb 15, 2024
182afc7
fix export
bso-intel Feb 15, 2024
0a97845
common returntype
bso-intel Feb 15, 2024
d62e175
unify preview
bso-intel Feb 16, 2024
3fdd985
revert
bso-intel Feb 16, 2024
8d1fa21
reduce to one method
bso-intel Feb 16, 2024
232e759
Update sycl/include/sycl/device.hpp
bso-intel Feb 16, 2024
019d30b
Update sycl/include/sycl/detail/util.hpp
bso-intel Feb 16, 2024
36e5dd8
Update sycl/include/sycl/detail/util.hpp
bso-intel Feb 16, 2024
b074631
Update sycl/include/sycl/platform.hpp
bso-intel Feb 16, 2024
524d53d
Update sycl/source/device.cpp
bso-intel Feb 16, 2024
4f9b8d4
Update sycl/source/platform.cpp
bso-intel Feb 16, 2024
fa1ae30
address feedback
bso-intel Feb 16, 2024
7095cf7
fix win abi symbols
bso-intel Feb 16, 2024
d6c7ddc
try alias
bso-intel Feb 19, 2024
82febee
missed #ifdef
bso-intel Feb 19, 2024
1748dea
fake detail::string
bso-intel Feb 19, 2024
5a37c73
Merge branch 'sergey2' into abi
bso-intel Feb 19, 2024
7780ca5
remove #ifdef
bso-intel Feb 20, 2024
3bc950d
add symbol
bso-intel Feb 20, 2024
0bf1237
windows symbol
bso-intel Feb 20, 2024
f31b89c
avoid duplicate body
bso-intel Feb 21, 2024
037a13b
Merge branch 'abi' of https://github.com/bso-intel/llvm into abi
bso-intel Feb 21, 2024
962fa26
try template
bso-intel Feb 22, 2024
d6ab3ca
template
bso-intel Feb 22, 2024
7eb7314
Merge remote-tracking branch 'upstream/sycl' into abi
bso-intel Feb 22, 2024
a11280e
rename
bso-intel Feb 22, 2024
f85a76a
remove param
bso-intel Feb 23, 2024
1327442
define ABINeutralT_t
bso-intel Feb 23, 2024
05dc42d
deduce
bso-intel Feb 23, 2024
050509e
moved namespace
bso-intel Feb 23, 2024
dd8e563
Update sycl/include/sycl/platform.hpp
bso-intel Feb 27, 2024
ffa36e1
Update sycl/source/device.cpp
bso-intel Feb 27, 2024
5c0b8a1
Update sycl/source/device.cpp
bso-intel Feb 27, 2024
28ad4fc
Update sycl/source/device.cpp
bso-intel Feb 27, 2024
823614d
Update sycl/include/sycl/platform.hpp
bso-intel Feb 27, 2024
c702858
change return type
bso-intel Feb 27, 2024
f1bf10d
WIP
aelovikov-intel Feb 27, 2024
43a7823
WIP2
aelovikov-intel Feb 27, 2024
37be2ba
WIP3
aelovikov-intel Feb 27, 2024
82908d5
WIP4
aelovikov-intel Feb 27, 2024
1ca910c
This is an ABI break
aelovikov-intel Feb 27, 2024
d88422a
But not anymore if do it like this.
aelovikov-intel Feb 27, 2024
b48f868
Merge remote-tracking branch 'andrei1/for-byoungro' into andrei3
bso-intel Feb 27, 2024
6e18644
merge
bso-intel Feb 27, 2024
0d19467
address feedback
bso-intel Feb 28, 2024
85b7d36
keep both
bso-intel Feb 28, 2024
b79a347
Update sycl/source/device.cpp
bso-intel Feb 29, 2024
1650d6d
Update sycl/include/sycl/device.hpp
bso-intel Feb 29, 2024
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
72 changes: 72 additions & 0 deletions sycl/include/sycl/detail/string.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
//==----------------- string.hpp - SYCL standard header file ---------------==//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include <cstring>
#include <string>

jopperm marked this conversation as resolved.
Show resolved Hide resolved
#pragma once

namespace sycl {
inline namespace _V1 {
namespace detail {

// This class and detail::string_view class are intended to support
// different ABIs between libsycl and the user program.
// This class is not inteded to replace std::string for general purpose usage.
class string {
char *str = nullptr;

public:
string() noexcept = default;
~string() { delete[] str; }

string(std::string_view strn) {
size_t len = strn.length();
str = new char[len + 1];
strn.copy(str, len);
str[len] = 0;
}

friend void swap(string &lhs, string &rhs) noexcept {
std::swap(lhs.str, rhs.str);
}

string(string &&other) noexcept { swap(*this, other); }
string(const string &other) {
if (other.str == nullptr)
return;
*this = string{other.str};
}

string &operator=(string &&other) noexcept {
swap(*this, other);
return *this;
}
string &operator=(const string &other) {
*this = string{other};
return *this;
}

string &operator=(std::string_view strn) {
*this = string{strn};
return *this;
}

const char *c_str() const noexcept { return str ? str : ""; }

friend bool operator==(const string &lhs, std::string_view rhs) noexcept {
return rhs == lhs.c_str();
}
friend bool operator==(std::string_view lhs, const string &rhs) noexcept {
return lhs == rhs.c_str();
}
};

} // namespace detail
} // namespace _V1
} // namespace sycl
52 changes: 52 additions & 0 deletions sycl/include/sycl/detail/string_view.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
//==-------------- string_view.hpp - SYCL standard header file -------------==//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include <string>

#pragma once

namespace sycl {
inline namespace _V1 {
namespace detail {

// This class and detail::string class are intended to support
// different ABIs between libsycl and the user program.
// This class is not inteded to replace std::string_view for general purpose
// usage.
class string_view {
const char *str = nullptr;

public:
string_view() noexcept = default;
string_view(const string_view &strn) noexcept = default;
string_view(string_view &&strn) noexcept = default;
string_view(std::string_view strn) noexcept : str(strn.data()) {}

string_view &operator=(string_view &&strn) noexcept = default;
string_view &operator=(const string_view &strn) noexcept = default;

string_view &operator=(std::string_view strn) noexcept {
str = strn.data();
return *this;
}

const char *data() const noexcept { return str; }

friend bool operator==(const string_view &lhs,
std::string_view rhs) noexcept {
return rhs == lhs.data();
}
friend bool operator==(std::string_view lhs,
const string_view &rhs) noexcept {
return lhs == rhs.data();
}
};

} // namespace detail
} // namespace _V1
} // namespace sycl
24 changes: 23 additions & 1 deletion sycl/include/sycl/detail/util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
#ifndef __SYCL_DEVICE_ONLY

#include <sycl/detail/defines.hpp>

#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
bso-intel marked this conversation as resolved.
Show resolved Hide resolved
#include <sycl/detail/string.hpp>
#endif
#include <cstring>
#include <mutex>
#include <vector>
Expand Down Expand Up @@ -67,6 +69,26 @@ struct CmpCStr {

using SerializedObj = std::vector<unsigned char>;

#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
template <typename T> struct ABINeutralT { using type = T; };
// We need special handling of std::string to handle ABI incompatibility
// for get_info<>() when it returns std::string and vector<std::string>.
// For this purpose, get_info_impl<>() is created to handle special
// cases, and it is only called internally and not exposed to the user.
// The following ReturnType structure is intended for general return type,
// and special return types (std::string and vector of it).

template <> struct ABINeutralT<std::string> { using type = detail::string; };

template <> struct ABINeutralT<std::vector<std::string>> {
using type = std::vector<detail::string>;
};

template <typename T> using ABINeutralT_t = typename ABINeutralT<T>::type;
#else
template <typename T> using ABINeutralT_t = T;
#endif
bso-intel marked this conversation as resolved.
Show resolved Hide resolved

} // namespace detail
} // namespace _V1
} // namespace sycl
Expand Down
62 changes: 43 additions & 19 deletions sycl/include/sycl/device.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,30 @@

#pragma once

#include <sycl/aspects.hpp> // for aspect
#include <sycl/backend_types.hpp> // for backend
#include <sycl/detail/defines_elementary.hpp> // for __SY...
#include <sycl/detail/export.hpp> // for __SY...
#include <sycl/detail/info_desc_helpers.hpp> // for is_d...
#include <sycl/detail/owner_less_base.hpp> // for Owne...
#include <sycl/detail/pi.h> // for pi_n...
#include <sycl/device_selector.hpp> // for Enab...
#include <sycl/ext/oneapi/experimental/device_architecture.hpp> // for arch...
#include <sycl/info/info_desc.hpp> // for part...
#include <sycl/platform.hpp> // for plat...

#include <cstddef> // for size_t
#include <memory> // for shar...
#include <string> // for string
#include <type_traits> // for add_...
#include <variant> // for hash
#include <vector> // for vector
#include <sycl/aspects.hpp>
#include <sycl/backend_types.hpp>
#include <sycl/detail/defines_elementary.hpp>
#include <sycl/detail/export.hpp>
#include <sycl/detail/info_desc_helpers.hpp>
#include <sycl/detail/owner_less_base.hpp>
#include <sycl/detail/pi.h>
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
#include <sycl/detail/string.hpp>
#include <sycl/detail/string_view.hpp>
#endif
#include <sycl/detail/util.hpp>
#include <sycl/device_selector.hpp>
#include <sycl/ext/oneapi/experimental/device_architecture.hpp>
#include <sycl/info/info_desc.hpp>
#include <sycl/platform.hpp>

#include <cstddef>
#include <memory>
#include <string>
#include <type_traits>
#include <typeinfo>
#include <variant>
#include <vector>

namespace sycl {
inline namespace _V1 {
Expand Down Expand Up @@ -214,8 +220,18 @@ class __SYCL_EXPORT device : public detail::OwnerLessBase<device> {
/// type associated with the param parameter.
///
/// \return device info of type described in Table 4.20.
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
template <typename Param>
typename detail::is_device_info_desc<Param>::return_type get_info() const {
auto Info = get_info_impl<Param>();
return detail::convert_from_abi_neutral(Info);
bso-intel marked this conversation as resolved.
Show resolved Hide resolved
}
#else
template <typename Param>
typename detail::is_device_info_desc<Param>::return_type get_info() const;
detail::ABINeutralT_t<
typename detail::is_device_info_desc<Param>::return_type>
get_info() const;
#endif

/// Check SYCL extension support by device
///
Expand Down Expand Up @@ -291,6 +307,13 @@ class __SYCL_EXPORT device : public detail::OwnerLessBase<device> {
template <backend BackendName, class SyclObjectT>
friend auto get_native(const SyclObjectT &Obj)
-> backend_return_t<BackendName, SyclObjectT>;

#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
template <typename Param>
typename detail::ABINeutralT_t<
typename detail::is_device_info_desc<Param>::return_type>
get_info_impl() const;
#endif
};

} // namespace _V1
Expand All @@ -303,4 +326,5 @@ template <> struct hash<sycl::device> {
sycl::detail::getSyclObjImpl(Device));
}
};

bso-intel marked this conversation as resolved.
Show resolved Hide resolved
} // namespace std
18 changes: 18 additions & 0 deletions sycl/include/sycl/exception.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,21 @@ class __SYCL_EXPORT exception : public virtual std::exception {

exception(std::error_code, const char *Msg);

#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
exception(std::error_code ec, const std::string &Msg)
bso-intel marked this conversation as resolved.
Show resolved Hide resolved
: exception(ec, nullptr, Msg.c_str()) {}
#else
exception(std::error_code, const std::string &Msg);
#endif

// new SYCL 2020 constructors
exception(std::error_code);
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
exception(int EV, const std::error_category &ECat, const std::string &WhatArg)
: exception(EV, ECat, WhatArg.c_str()) {}
#else
exception(int, const std::error_category &, const std::string &);
#endif
exception(int, const std::error_category &, const char *);
exception(int, const std::error_category &);

Expand Down Expand Up @@ -127,8 +137,16 @@ class __SYCL_EXPORT exception : public virtual std::exception {
// base constructor for all SYCL 2020 constructors
// exception(context *ctxPtr, std::error_code ec, const std::string
// &what_arg);
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
exception(std::error_code ec, std::shared_ptr<context> SharedPtrCtx,
bso-intel marked this conversation as resolved.
Show resolved Hide resolved
const std::string &what_arg)
: exception(ec, SharedPtrCtx, what_arg.c_str()) {}
exception(std::error_code EC, std::shared_ptr<context> SharedPtrCtx,
const char *WhatArg);
#else
exception(std::error_code ec, std::shared_ptr<context> SharedPtrCtx,
const std::string &what_arg);
#endif
victor-eds marked this conversation as resolved.
Show resolved Hide resolved
};

class __SYCL2020_DEPRECATED(
Expand Down
41 changes: 37 additions & 4 deletions sycl/include/sycl/handler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
#include <sycl/detail/pi.h>
#include <sycl/detail/pi.hpp>
#include <sycl/detail/reduction_forward.hpp>
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
#include <sycl/detail/string.hpp>
#include <sycl/detail/string_view.hpp>
#endif
#include <sycl/device.hpp>
#include <sycl/event.hpp>
#include <sycl/exception.hpp>
Expand Down Expand Up @@ -415,6 +419,10 @@ template <int Dims> bool range_size_fits_in_size_t(const range<Dims> &r) {
}
return true;
}
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
using string = std::string;
using string_view = std::string;
#endif

} // namespace detail

Expand Down Expand Up @@ -543,7 +551,7 @@ class __SYCL_EXPORT handler {
bool IsKernelCreatedFromSource, bool IsESIMD);

/// \return a string containing name of SYCL kernel.
std::string getKernelName();
detail::string getKernelName();

template <typename LambdaNameT> bool lambdaAndKernelHaveEqualName() {
// TODO It is unclear a kernel and a lambda/functor must to be equal or not
Expand All @@ -553,8 +561,8 @@ class __SYCL_EXPORT handler {
// values of arguments for the kernel.
assert(MKernel && "MKernel is not initialized");
const std::string LambdaName = detail::KernelInfo<LambdaNameT>::getName();
const std::string KernelName = getKernelName();
return LambdaName == KernelName;
detail::string KernelName = getKernelName();
bso-intel marked this conversation as resolved.
Show resolved Hide resolved
return KernelName == LambdaName;
}

/// Saves the location of user's code passed in \p CodeLoc for future usage in
Expand Down Expand Up @@ -837,7 +845,14 @@ class __SYCL_EXPORT handler {
///
/// \param KernelName is the name of the SYCL kernel to check that the used
/// kernel bundle contains.
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
void verifyUsedKernelBundle(const std::string &KernelName) {
verifyUsedKernelBundleInternal(detail::string_view{KernelName});
}
void verifyUsedKernelBundleInternal(detail::string_view KernelName);
#else
void verifyUsedKernelBundle(const std::string &KernelName);
#endif

/// Stores lambda to the template-free object
///
Expand Down Expand Up @@ -3307,7 +3322,7 @@ class __SYCL_EXPORT handler {
std::vector<detail::ArgDesc> MAssociatedAccesors;
/// Struct that encodes global size, local size, ...
detail::NDRDescT MNDRDesc;
std::string MKernelName;
detail::string MKernelName;
Copy link
Contributor

Choose a reason for hiding this comment

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

Every use of this seems to expect an std::string. Do we really need to change this data member, or maybe just a few places where it's getting assigned to?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, this private data member should cross the ABI boundary.
So I had to convert it to detail::string to overcome the ABI incompatibility issue.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, that brings another question. How are you testing that there are no std::strings crossing the boundary?

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, have you tried changing callees accepting MKernelName instead of modifying the callers?

Copy link
Contributor Author

@bso-intel bso-intel Feb 28, 2024

Choose a reason for hiding this comment

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

I can't check everywhere at this moment.
That's why this PR is only the initial changes as the title of PR says.
We will fix as we encounter from the customer's usage case.

Also, have you tried changing callees accepting MKernelName instead of modifying the callers?

I am not sure if I understand this question correctly, so please correct me if I misunderstood you.
MKernelName is defined in the headerfile, and the callees (cpp files) need this data member.
So, they accept MKernelName, but I can't hand over std::string since it is crossing the ABI boundary.
So, I changed MKernelName to detail::string and then the callee re-construct std::string in the CPP file.

Copy link
Contributor

Choose a reason for hiding this comment

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

Do they really need std::string? Can they keep using detail::string or detail::string_view?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well.. That's called code pollution.
We (including @sergey-semenov) do not want to propagate detail::string deep on the CPP side.
detail::string and detail::string_view should be limited to be used when crossing the ABI boundary. They are not meant to replace std::string and std::string_view.

Copy link
Contributor

Choose a reason for hiding this comment

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

I only partially agree with that. I think many of these interfaces currently accept const std::string & and they have no reason to ask for that and not for std::string_view. And if so, then everything can work automatically without us making ugly #ifdefs: https://godbolt.org/z/Wc8Kd14Y8.

/// Storage for a sycl::kernel object.
std::shared_ptr<detail::kernel_impl> MKernel;
/// Type of the command group, e.g. kernel, fill. Can also encode version.
Expand Down Expand Up @@ -3409,17 +3424,35 @@ class __SYCL_EXPORT handler {
/// expr m_Storage member
/// \param Size the size of data getting read back / to.
/// \param Block if read operation is blocking, default to false.
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
void ext_intel_read_host_pipe(const std::string &Name, void *Ptr, size_t Size,
bool Block = false) {
ext_intel_read_host_pipe(detail::string_view(Name), Ptr, Size, Block);
}
void ext_intel_read_host_pipe(detail::string_view Name, void *Ptr,
size_t Size, bool Block = false);
aelovikov-intel marked this conversation as resolved.
Show resolved Hide resolved
#else
void ext_intel_read_host_pipe(const std::string &Name, void *Ptr, size_t Size,
bool Block = false);
#endif

/// Write to host pipes given a host address and
/// \param Name name of the host pipe to be passed into lower level runtime
/// \param Ptr host pointer of host pipe as identified by address of its const
/// expr m_Storage member
/// \param Size the size of data getting read back / to.
/// \param Block if write opeartion is blocking, default to false.
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
void ext_intel_write_host_pipe(const std::string &Name, void *Ptr,
size_t Size, bool Block = false) {
ext_intel_write_host_pipe(detail::string_view(Name), Ptr, Size, Block);
}
void ext_intel_write_host_pipe(detail::string_view Name, void *Ptr,
size_t Size, bool Block = false);
#else
void ext_intel_write_host_pipe(const std::string &Name, void *Ptr,
size_t Size, bool Block = false);
#endif
friend class ext::oneapi::experimental::detail::graph_impl;

bool DisableRangeRounding();
Expand Down
Loading
Loading