Skip to content

[ABI-Break][SYCL] Remove deprecated property use_primary_context #13378

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 0 additions & 4 deletions sycl/include/sycl/detail/cuda_definitions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@

// Mem Object info: Retrieve the raw CUDA pointer from a cl_mem
#define __SYCL_PI_CUDA_RAW_POINTER (0xFF01)
// Context creation: Use a primary CUDA context instead of a custom one by
// providing a property value of PI_TRUE for the following
// property ID.
#define __SYCL_PI_CONTEXT_PROPERTIES_CUDA_PRIMARY (0xFF02)

// PI Command Queue using Default stream
#define __SYCL_PI_CUDA_USE_DEFAULT_STREAM (0xFF03)
Expand Down
4 changes: 0 additions & 4 deletions sycl/include/sycl/detail/properties_traits.def
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ __SYCL_PARAM_TRAITS_SPEC(
sycl::ext::oneapi::property::buffer::use_pinned_host_memory)
__SYCL_PARAM_TRAITS_SPEC(sycl::property::noinit)
__SYCL_PARAM_TRAITS_SPEC(sycl::property::no_init)
__SYCL_PARAM_TRAITS_SPEC(
sycl::property::context::cuda::use_primary_context) // Deprecated
__SYCL_PARAM_TRAITS_SPEC(
sycl::ext::oneapi::cuda::property::context::use_primary_context) // Deprecated
__SYCL_PARAM_TRAITS_SPEC(sycl::property::queue::in_order)
__SYCL_PARAM_TRAITS_SPEC(sycl::property::reduction::initialize_to_identity)
__SYCL_PARAM_TRAITS_SPEC(sycl::ext::oneapi::property::queue::priority_low)
Expand Down
1 change: 0 additions & 1 deletion sycl/include/sycl/properties/all_properties.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <sycl/ext/codeplay/experimental/fusion_properties.hpp>
#include <sycl/properties/accessor_properties.hpp>
#include <sycl/properties/buffer_properties.hpp>
#include <sycl/properties/context_properties.hpp>
#include <sycl/properties/image_properties.hpp>
#include <sycl/properties/queue_properties.hpp>
#include <sycl/properties/reduction_properties.hpp>
49 changes: 0 additions & 49 deletions sycl/include/sycl/properties/context_properties.hpp

This file was deleted.

18 changes: 2 additions & 16 deletions sycl/source/detail/context_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include <sycl/exception_list.hpp>
#include <sycl/info/info_desc.hpp>
#include <sycl/platform.hpp>
#include <sycl/properties/context_properties.hpp>
#include <sycl/property_list.hpp>

#include <algorithm>
Expand Down Expand Up @@ -63,21 +62,8 @@ context_impl::context_impl(const std::vector<sycl::device> Devices,
DeviceIds.push_back(getSyclObjImpl(D)->getHandleRef());
}

if (getBackend() == backend::ext_oneapi_cuda) {
const bool UseCUDAPrimaryContext = MPropList.has_property<
ext::oneapi::cuda::property::context::use_primary_context>();
const pi_context_properties Props[] = {
static_cast<pi_context_properties>(
__SYCL_PI_CONTEXT_PROPERTIES_CUDA_PRIMARY),
static_cast<pi_context_properties>(UseCUDAPrimaryContext), 0};

getPlugin()->call<PiApiKind::piContextCreate>(
Props, DeviceIds.size(), DeviceIds.data(), nullptr, nullptr, &MContext);
} else {
getPlugin()->call<PiApiKind::piContextCreate>(nullptr, DeviceIds.size(),
DeviceIds.data(), nullptr,
nullptr, &MContext);
}
getPlugin()->call<PiApiKind::piContextCreate>(
nullptr, DeviceIds.size(), DeviceIds.data(), nullptr, nullptr, &MContext);

MKernelProgramCache.setContextPtr(this);
}
Expand Down
1 change: 0 additions & 1 deletion sycl/source/detail/queue_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include <sycl/exception_list.hpp>
#include <sycl/ext/codeplay/experimental/fusion_properties.hpp>
#include <sycl/handler.hpp>
#include <sycl/properties/context_properties.hpp>
#include <sycl/properties/queue_properties.hpp>
#include <sycl/property_list.hpp>
#include <sycl/queue.hpp>
Expand Down
16 changes: 1 addition & 15 deletions sycl/test-e2e/Basic/context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ int main() {
assert(Context == WillContextCopy);
}
{
auto AsyncHandler = [](const sycl::exception_list &EL) {};
auto AsyncHandler = [](const sycl::exception_list) {};
sycl::context Context1(sycl::property_list{});
sycl::context Context2(AsyncHandler, sycl::property_list{});
sycl::context Context3(deviceA, sycl::property_list{});
Expand All @@ -63,19 +63,5 @@ int main() {
sycl::property_list{});
sycl::context Context7(std::vector<sycl::device>{deviceA},
sycl::property_list{});
sycl::context Context8(
std::vector<sycl::device>{deviceA}, AsyncHandler,
sycl::property_list{
sycl::ext::oneapi::cuda::property::context::use_primary_context{}});

if (!Context8.has_property<sycl::ext::oneapi::cuda::property::context::
use_primary_context>()) {
std::cerr << "Line " << __LINE__ << ": Property was not found"
<< std::endl;
return 1;
}

auto Prop = Context8.get_property<
sycl::ext::oneapi::cuda::property::context::use_primary_context>();
}
}
20 changes: 0 additions & 20 deletions sycl/test/abi/sycl_symbols_linux.dump
Original file line number Diff line number Diff line change
Expand Up @@ -3795,7 +3795,6 @@ _ZNK4sycl3_V16detail11device_impl8get_infoINS0_3ext8codeplay12experimental4info6
_ZNK4sycl3_V16detail11device_impl8get_infoINS0_3ext8codeplay12experimental4info6device28max_registers_per_work_groupEEENT_11return_typeEv
_ZNK4sycl3_V16detail11image_plain10getSamplerEv
_ZNK4sycl3_V16detail11image_plain11getRowPitchEv
_ZNK4sycl3_V16detail11image_plain12get_propertyINS0_3ext6oneapi4cuda8property7context19use_primary_contextEEET_v
_ZNK4sycl3_V16detail11image_plain12get_propertyINS0_3ext6oneapi8property5queue12priority_lowEEET_v
_ZNK4sycl3_V16detail11image_plain12get_propertyINS0_3ext6oneapi8property5queue13priority_highEEET_v
_ZNK4sycl3_V16detail11image_plain12get_propertyINS0_3ext6oneapi8property5queue15priority_normalEEET_v
Expand All @@ -3809,10 +3808,8 @@ _ZNK4sycl3_V16detail11image_plain12get_propertyINS0_8property6buffer12use_host_p
_ZNK4sycl3_V16detail11image_plain12get_propertyINS0_8property6buffer13context_boundEEET_v
_ZNK4sycl3_V16detail11image_plain12get_propertyINS0_8property6buffer9use_mutexEEET_v
_ZNK4sycl3_V16detail11image_plain12get_propertyINS0_8property6noinitEEET_v
_ZNK4sycl3_V16detail11image_plain12get_propertyINS0_8property7context4cuda19use_primary_contextEEET_v
_ZNK4sycl3_V16detail11image_plain12get_propertyINS0_8property7no_initEEET_v
_ZNK4sycl3_V16detail11image_plain12get_propertyINS0_8property9reduction22initialize_to_identityEEET_v
_ZNK4sycl3_V16detail11image_plain12has_propertyINS0_3ext6oneapi4cuda8property7context19use_primary_contextEEEbv
_ZNK4sycl3_V16detail11image_plain12has_propertyINS0_3ext6oneapi8property5queue12priority_lowEEEbv
_ZNK4sycl3_V16detail11image_plain12has_propertyINS0_3ext6oneapi8property5queue13priority_highEEEbv
_ZNK4sycl3_V16detail11image_plain12has_propertyINS0_3ext6oneapi8property5queue15priority_normalEEEbv
Expand All @@ -3826,7 +3823,6 @@ _ZNK4sycl3_V16detail11image_plain12has_propertyINS0_8property6buffer12use_host_p
_ZNK4sycl3_V16detail11image_plain12has_propertyINS0_8property6buffer13context_boundEEEbv
_ZNK4sycl3_V16detail11image_plain12has_propertyINS0_8property6buffer9use_mutexEEEbv
_ZNK4sycl3_V16detail11image_plain12has_propertyINS0_8property6noinitEEEbv
_ZNK4sycl3_V16detail11image_plain12has_propertyINS0_8property7context4cuda19use_primary_contextEEEbv
_ZNK4sycl3_V16detail11image_plain12has_propertyINS0_8property7no_initEEEbv
_ZNK4sycl3_V16detail11image_plain12has_propertyINS0_8property9reduction22initialize_to_identityEEEbv
_ZNK4sycl3_V16detail11image_plain13getSlicePitchEv
Expand All @@ -3842,7 +3838,6 @@ _ZNK4sycl3_V16detail11stream_impl22get_max_statement_sizeEv
_ZNK4sycl3_V16detail11stream_impl25get_work_item_buffer_sizeEv
_ZNK4sycl3_V16detail11stream_impl4sizeEv
_ZNK4sycl3_V16detail11stream_impl8get_sizeEv
_ZNK4sycl3_V16detail12buffer_plain12get_propertyINS0_3ext6oneapi4cuda8property7context19use_primary_contextEEET_v
_ZNK4sycl3_V16detail12buffer_plain12get_propertyINS0_3ext6oneapi8property5queue12priority_lowEEET_v
_ZNK4sycl3_V16detail12buffer_plain12get_propertyINS0_3ext6oneapi8property5queue13priority_highEEET_v
_ZNK4sycl3_V16detail12buffer_plain12get_propertyINS0_3ext6oneapi8property5queue15priority_normalEEET_v
Expand All @@ -3856,10 +3851,8 @@ _ZNK4sycl3_V16detail12buffer_plain12get_propertyINS0_8property6buffer12use_host_
_ZNK4sycl3_V16detail12buffer_plain12get_propertyINS0_8property6buffer13context_boundEEET_v
_ZNK4sycl3_V16detail12buffer_plain12get_propertyINS0_8property6buffer9use_mutexEEET_v
_ZNK4sycl3_V16detail12buffer_plain12get_propertyINS0_8property6noinitEEET_v
_ZNK4sycl3_V16detail12buffer_plain12get_propertyINS0_8property7context4cuda19use_primary_contextEEET_v
_ZNK4sycl3_V16detail12buffer_plain12get_propertyINS0_8property7no_initEEET_v
_ZNK4sycl3_V16detail12buffer_plain12get_propertyINS0_8property9reduction22initialize_to_identityEEET_v
_ZNK4sycl3_V16detail12buffer_plain12has_propertyINS0_3ext6oneapi4cuda8property7context19use_primary_contextEEEbv
_ZNK4sycl3_V16detail12buffer_plain12has_propertyINS0_3ext6oneapi8property5queue12priority_lowEEEbv
_ZNK4sycl3_V16detail12buffer_plain12has_propertyINS0_3ext6oneapi8property5queue13priority_highEEEbv
_ZNK4sycl3_V16detail12buffer_plain12has_propertyINS0_3ext6oneapi8property5queue15priority_normalEEEbv
Expand All @@ -3873,7 +3866,6 @@ _ZNK4sycl3_V16detail12buffer_plain12has_propertyINS0_8property6buffer12use_host_
_ZNK4sycl3_V16detail12buffer_plain12has_propertyINS0_8property6buffer13context_boundEEEbv
_ZNK4sycl3_V16detail12buffer_plain12has_propertyINS0_8property6buffer9use_mutexEEEbv
_ZNK4sycl3_V16detail12buffer_plain12has_propertyINS0_8property6noinitEEEbv
_ZNK4sycl3_V16detail12buffer_plain12has_propertyINS0_8property7context4cuda19use_primary_contextEEEbv
_ZNK4sycl3_V16detail12buffer_plain12has_propertyINS0_8property7no_initEEEbv
_ZNK4sycl3_V16detail12buffer_plain12has_propertyINS0_8property9reduction22initialize_to_identityEEEbv
_ZNK4sycl3_V16detail12buffer_plain13handleReleaseEv
Expand Down Expand Up @@ -4117,7 +4109,6 @@ _ZNK4sycl3_V16kernel8get_infoINS0_4info22kernel_device_specific22compile_sub_gro
_ZNK4sycl3_V16kernel8get_infoINS0_4info22kernel_device_specific23compile_work_group_sizeEEENS0_6detail35is_kernel_device_specific_info_descIT_E11return_typeERKNS0_6deviceE
_ZNK4sycl3_V16kernel8get_infoINS0_4info22kernel_device_specific34preferred_work_group_size_multipleEEENS0_6detail35is_kernel_device_specific_info_descIT_E11return_typeERKNS0_6deviceE
_ZNK4sycl3_V16kernel9getNativeEv
_ZNK4sycl3_V16stream12get_propertyINS0_3ext6oneapi4cuda8property7context19use_primary_contextEEET_v
_ZNK4sycl3_V16stream12get_propertyINS0_3ext6oneapi8property5queue12priority_lowEEET_v
_ZNK4sycl3_V16stream12get_propertyINS0_3ext6oneapi8property5queue13priority_highEEET_v
_ZNK4sycl3_V16stream12get_propertyINS0_3ext6oneapi8property5queue15priority_normalEEET_v
Expand All @@ -4131,10 +4122,8 @@ _ZNK4sycl3_V16stream12get_propertyINS0_8property6buffer12use_host_ptrEEET_v
_ZNK4sycl3_V16stream12get_propertyINS0_8property6buffer13context_boundEEET_v
_ZNK4sycl3_V16stream12get_propertyINS0_8property6buffer9use_mutexEEET_v
_ZNK4sycl3_V16stream12get_propertyINS0_8property6noinitEEET_v
_ZNK4sycl3_V16stream12get_propertyINS0_8property7context4cuda19use_primary_contextEEET_v
_ZNK4sycl3_V16stream12get_propertyINS0_8property7no_initEEET_v
_ZNK4sycl3_V16stream12get_propertyINS0_8property9reduction22initialize_to_identityEEET_v
_ZNK4sycl3_V16stream12has_propertyINS0_3ext6oneapi4cuda8property7context19use_primary_contextEEEbv
_ZNK4sycl3_V16stream12has_propertyINS0_3ext6oneapi8property5queue12priority_lowEEEbv
_ZNK4sycl3_V16stream12has_propertyINS0_3ext6oneapi8property5queue13priority_highEEEbv
_ZNK4sycl3_V16stream12has_propertyINS0_3ext6oneapi8property5queue15priority_normalEEEbv
Expand All @@ -4148,7 +4137,6 @@ _ZNK4sycl3_V16stream12has_propertyINS0_8property6buffer12use_host_ptrEEEbv
_ZNK4sycl3_V16stream12has_propertyINS0_8property6buffer13context_boundEEEbv
_ZNK4sycl3_V16stream12has_propertyINS0_8property6buffer9use_mutexEEEbv
_ZNK4sycl3_V16stream12has_propertyINS0_8property6noinitEEEbv
_ZNK4sycl3_V16stream12has_propertyINS0_8property7context4cuda19use_primary_contextEEEbv
_ZNK4sycl3_V16stream12has_propertyINS0_8property7no_initEEEbv
_ZNK4sycl3_V16stream12has_propertyINS0_8property9reduction22initialize_to_identityEEEbv
_ZNK4sycl3_V16stream22get_max_statement_sizeEv
Expand All @@ -4160,7 +4148,6 @@ _ZNK4sycl3_V16streamneERKS1_
_ZNK4sycl3_V17context11get_backendEv
_ZNK4sycl3_V17context11get_devicesEv
_ZNK4sycl3_V17context12get_platformEv
_ZNK4sycl3_V17context12get_propertyINS0_3ext6oneapi4cuda8property7context19use_primary_contextEEET_v
_ZNK4sycl3_V17context12get_propertyINS0_3ext6oneapi8property5queue12priority_lowEEET_v
_ZNK4sycl3_V17context12get_propertyINS0_3ext6oneapi8property5queue13priority_highEEET_v
_ZNK4sycl3_V17context12get_propertyINS0_3ext6oneapi8property5queue15priority_normalEEET_v
Expand All @@ -4174,10 +4161,8 @@ _ZNK4sycl3_V17context12get_propertyINS0_8property6buffer12use_host_ptrEEET_v
_ZNK4sycl3_V17context12get_propertyINS0_8property6buffer13context_boundEEET_v
_ZNK4sycl3_V17context12get_propertyINS0_8property6buffer9use_mutexEEET_v
_ZNK4sycl3_V17context12get_propertyINS0_8property6noinitEEET_v
_ZNK4sycl3_V17context12get_propertyINS0_8property7context4cuda19use_primary_contextEEET_v
_ZNK4sycl3_V17context12get_propertyINS0_8property7no_initEEET_v
_ZNK4sycl3_V17context12get_propertyINS0_8property9reduction22initialize_to_identityEEET_v
_ZNK4sycl3_V17context12has_propertyINS0_3ext6oneapi4cuda8property7context19use_primary_contextEEEbv
_ZNK4sycl3_V17context12has_propertyINS0_3ext6oneapi8property5queue12priority_lowEEEbv
_ZNK4sycl3_V17context12has_propertyINS0_3ext6oneapi8property5queue13priority_highEEEbv
_ZNK4sycl3_V17context12has_propertyINS0_3ext6oneapi8property5queue15priority_normalEEEbv
Expand All @@ -4191,7 +4176,6 @@ _ZNK4sycl3_V17context12has_propertyINS0_8property6buffer12use_host_ptrEEEbv
_ZNK4sycl3_V17context12has_propertyINS0_8property6buffer13context_boundEEEbv
_ZNK4sycl3_V17context12has_propertyINS0_8property6buffer9use_mutexEEEbv
_ZNK4sycl3_V17context12has_propertyINS0_8property6noinitEEEbv
_ZNK4sycl3_V17context12has_propertyINS0_8property7context4cuda19use_primary_contextEEEbv
_ZNK4sycl3_V17context12has_propertyINS0_8property7no_initEEEbv
_ZNK4sycl3_V17context12has_propertyINS0_8property9reduction22initialize_to_identityEEEbv
_ZNK4sycl3_V17context16get_backend_infoINS0_4info6device15backend_versionEEENS0_6detail20is_backend_info_descIT_E11return_typeEv
Expand All @@ -4211,7 +4195,6 @@ _ZNK4sycl3_V17handler15getCommandGraphEv
_ZNK4sycl3_V17handler17getContextImplPtrEv
_ZNK4sycl3_V17handler27isStateExplicitKernelBundleEv
_ZNK4sycl3_V17handler30getOrInsertHandlerKernelBundleEb
_ZNK4sycl3_V17sampler12get_propertyINS0_3ext6oneapi4cuda8property7context19use_primary_contextEEET_v
_ZNK4sycl3_V17sampler12get_propertyINS0_3ext6oneapi8property5queue12priority_lowEEET_v
_ZNK4sycl3_V17sampler12get_propertyINS0_3ext6oneapi8property5queue13priority_highEEET_v
_ZNK4sycl3_V17sampler12get_propertyINS0_3ext6oneapi8property5queue15priority_normalEEET_v
Expand All @@ -4225,10 +4208,8 @@ _ZNK4sycl3_V17sampler12get_propertyINS0_8property6buffer12use_host_ptrEEET_v
_ZNK4sycl3_V17sampler12get_propertyINS0_8property6buffer13context_boundEEET_v
_ZNK4sycl3_V17sampler12get_propertyINS0_8property6buffer9use_mutexEEET_v
_ZNK4sycl3_V17sampler12get_propertyINS0_8property6noinitEEET_v
_ZNK4sycl3_V17sampler12get_propertyINS0_8property7context4cuda19use_primary_contextEEET_v
_ZNK4sycl3_V17sampler12get_propertyINS0_8property7no_initEEET_v
_ZNK4sycl3_V17sampler12get_propertyINS0_8property9reduction22initialize_to_identityEEET_v
_ZNK4sycl3_V17sampler12has_propertyINS0_3ext6oneapi4cuda8property7context19use_primary_contextEEEbv
_ZNK4sycl3_V17sampler12has_propertyINS0_3ext6oneapi8property5queue12priority_lowEEEbv
_ZNK4sycl3_V17sampler12has_propertyINS0_3ext6oneapi8property5queue13priority_highEEEbv
_ZNK4sycl3_V17sampler12has_propertyINS0_3ext6oneapi8property5queue15priority_normalEEEbv
Expand All @@ -4242,7 +4223,6 @@ _ZNK4sycl3_V17sampler12has_propertyINS0_8property6buffer12use_host_ptrEEEbv
_ZNK4sycl3_V17sampler12has_propertyINS0_8property6buffer13context_boundEEEbv
_ZNK4sycl3_V17sampler12has_propertyINS0_8property6buffer9use_mutexEEEbv
_ZNK4sycl3_V17sampler12has_propertyINS0_8property6noinitEEEbv
_ZNK4sycl3_V17sampler12has_propertyINS0_8property7context4cuda19use_primary_contextEEEbv
_ZNK4sycl3_V17sampler12has_propertyINS0_8property7no_initEEEbv
_ZNK4sycl3_V17sampler12has_propertyINS0_8property9reduction22initialize_to_identityEEEbv
_ZNK4sycl3_V17sampler18get_filtering_modeEv
Expand Down
Loading