Skip to content
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
6 changes: 3 additions & 3 deletions buildbot/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def do_configure(args, passthrough_args):
libclc_build_native = "OFF"
libclc_targets_to_build = ""
libclc_gen_remangled_variants = "OFF"
sycl_build_pi_hip_platform = "AMD"
sycl_build_ur_hip_platform = "AMD"
sycl_clang_extra_flags = ""
sycl_werror = "OFF"
llvm_enable_assertions = "ON"
Expand Down Expand Up @@ -104,7 +104,7 @@ def do_configure(args, passthrough_args):
libclc_targets_to_build += libclc_nvidia_target_names
libclc_gen_remangled_variants = "ON"

sycl_build_pi_hip_platform = args.hip_platform
sycl_build_ur_hip_platform = args.hip_platform
sycl_enabled_backends.append("hip")

if args.native_cpu:
Expand Down Expand Up @@ -197,7 +197,7 @@ def do_configure(args, passthrough_args):
"-DLLVM_EXTERNAL_LIBDEVICE_SOURCE_DIR={}".format(libdevice_dir),
"-DLLVM_EXTERNAL_SYCL_JIT_SOURCE_DIR={}".format(jit_dir),
"-DLLVM_ENABLE_PROJECTS={}".format(llvm_enable_projects),
"-DSYCL_BUILD_PI_HIP_PLATFORM={}".format(sycl_build_pi_hip_platform),
"-DSYCL_BUILD_UR_HIP_PLATFORM={}".format(sycl_build_ur_hip_platform),
"-DLLVM_BUILD_TOOLS=ON",
"-DLLVM_ENABLE_ZSTD={}".format(llvm_enable_zstd),
"-DLLVM_USE_STATIC_ZSTD=ON",
Expand Down
6 changes: 3 additions & 3 deletions sycl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,8 @@ option(SYCL_INCLUDE_TESTS
${LLVM_INCLUDE_TESTS})

# Ensure that HIP platform is uppercase, to match buildbot's output.
if(NOT "${SYCL_BUILD_PI_HIP_PLATFORM}" STREQUAL "")
string(TOUPPER ${SYCL_BUILD_PI_HIP_PLATFORM} SYCL_BUILD_PI_HIP_PLATFORM)
if(NOT "${SYCL_BUILD_UR_HIP_PLATFORM}" STREQUAL "")
string(TOUPPER ${SYCL_BUILD_UR_HIP_PLATFORM} SYCL_BUILD_UR_HIP_PLATFORM)
endif()

add_subdirectory(tools)
Expand Down Expand Up @@ -551,7 +551,7 @@ if("hip" IN_LIST SYCL_ENABLE_BACKENDS)
"HIP support requires adding \"libclc\" to the CMake argument \"LLVM_ENABLE_PROJECTS\"")
endif()

if(NOT TARGET lld AND "${SYCL_BUILD_PI_HIP_PLATFORM}" STREQUAL "AMD")
if(NOT TARGET lld AND "${SYCL_BUILD_UR_HIP_PLATFORM}" STREQUAL "AMD")
message(FATAL_ERROR
"HIP support requires adding \"lld\" to the CMake argument \"LLVM_ENABLE_PROJECTS\"")
endif()
Expand Down
6 changes: 3 additions & 3 deletions sycl/include/sycl/detail/info_desc_helpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ template <typename T> struct is_backend_info_desc : std::false_type {};
struct is_##DescType##_info_desc<info::DescType::Desc> : std::true_type { \
using return_type = info::DescType::Desc::return_type; \
};
#define __SYCL_PARAM_TRAITS_SPEC_SPECIALIZED(DescType, Desc, ReturnT, PiCode) \
__SYCL_PARAM_TRAITS_SPEC(DescType, Desc, ReturnT, PiCode)
#define __SYCL_PARAM_TRAITS_SPEC_SPECIALIZED(DescType, Desc, ReturnT, UrCode) \
__SYCL_PARAM_TRAITS_SPEC(DescType, Desc, ReturnT, UrCode)

#include <sycl/info/device_traits.def>

Expand All @@ -103,7 +103,7 @@ template <typename T> struct is_backend_info_desc : std::false_type {};
#include <sycl/info/ext_oneapi_device_traits.def>
#undef __SYCL_PARAM_TRAITS_SPEC

#define __SYCL_PARAM_TRAITS_SPEC(Namespace, DescType, Desc, ReturnT, PiCode) \
#define __SYCL_PARAM_TRAITS_SPEC(Namespace, DescType, Desc, ReturnT, UrCode) \
template <> \
struct is_##DescType##_info_desc<Namespace::info::DescType::Desc> \
: std::true_type { \
Expand Down
2 changes: 1 addition & 1 deletion sycl/source/context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ context::get_info() const {
return impl->template get_info<Param>();
}

#define __SYCL_PARAM_TRAITS_SPEC(DescType, Desc, ReturnT, PiCode) \
#define __SYCL_PARAM_TRAITS_SPEC(DescType, Desc, ReturnT, UrCode) \
template __SYCL_EXPORT ReturnT context::get_info<info::DescType::Desc>() \
const;

Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ getUrEventsBlocking(std::vector<EventImplPtr> &Events, bool HasEventMode,
// Interoperability events are special cases and they are not enqueued, as
// they don't have an associated queue and command.
if (!Event->isInterop() && !Event->isEnqueued()) {
if (!Event->getCommand() || !Event->getCommand()->producesPiEvent())
if (!Event->getCommand() || !Event->getCommand()->producesUrEvent())
continue;
std::vector<Command *> AuxCmds;
Scheduler::getInstance().enqueueCommandForCG(*Event, AuxCmds, BLOCKING);
Expand Down
4 changes: 2 additions & 2 deletions sycl/source/detail/memory_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1048,7 +1048,7 @@ memcpyToDeviceGlobalUSM(queue_impl &Queue,
DeviceGlobalEntry->getOrAllocateDeviceGlobalUSM(Queue);
void *Dest = DeviceGlobalUSM.getPtr();

// OwnedPiEvent will keep the initialization event alive for the duration
// OwnedUrEvent will keep the initialization event alive for the duration
// of this function call.
OwnedUrEvent ZIEvent = DeviceGlobalUSM.getInitEvent(Queue.getAdapter());

Expand Down Expand Up @@ -1080,7 +1080,7 @@ static void memcpyFromDeviceGlobalUSM(
DeviceGlobalEntry->getOrAllocateDeviceGlobalUSM(Queue);
void *Src = DeviceGlobalUSM.getPtr();

// OwnedPiEvent will keep the initialization event alive for the duration
// OwnedUrEvent will keep the initialization event alive for the duration
// of this function call.
OwnedUrEvent ZIEvent = DeviceGlobalUSM.getInitEvent(Queue.getAdapter());

Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/program_manager/program_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ ProgramManager::createURProgram(const RTDeviceBinaryImage &Img,

if (Format == SYCL_DEVICE_BINARY_TYPE_NONE)
Format = ur::getBinaryImageFormat(RawImg.BinaryStart, ImgSize);
// sycl::detail::pi::PiDeviceBinaryType Format = Img->Format;
// ur::DeviceBinaryType Format = Img->Format;
// assert(Format != SYCL_DEVICE_BINARY_TYPE_NONE && "Image format not set");

if (!isDeviceBinaryTypeSupported(ContextImpl, Format))
Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/queue_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@ event queue_impl::submitMemOpHelper(const std::vector<event> &DepEvents,
NestedCallsTracker tracker;
MemOpFunc(std::forward<MemOpArgTs>(MemOpArgs)...,
getUrEvents(ExpandedDepEvents),
/*PiEvent*/ nullptr);
/*UrEvent*/ nullptr);

return createSyclObjFromImpl<event>(
event_impl::create_discarded_event());
Expand Down
4 changes: 0 additions & 4 deletions sycl/source/detail/queue_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -515,10 +515,6 @@ class queue_impl : public std::enable_shared_from_this<queue_impl> {
ur_queue_handle_t Queue{};
ur_context_handle_t Context = MContext->getHandleRef();
ur_device_handle_t Device = MDevice.getHandleRef();
/*
sycl::detail::pi::PiQueueProperties Properties[] = {
PI_QUEUE_FLAGS, createPiQueueProperties(MPropList, Order), 0, 0, 0};
*/
ur_queue_properties_t Properties = {UR_STRUCTURE_TYPE_QUEUE_PROPERTIES,
nullptr, 0};
Properties.flags = createUrQueueFlags(MPropList, Order);
Expand Down
22 changes: 11 additions & 11 deletions sycl/source/detail/scheduler/commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -705,12 +705,12 @@ Command *Command::processDepEvent(EventImplPtr DepEvent, const DepDesc &Dep,
// 2. Some types of commands do not produce UR events after they are
// enqueued (e.g. alloca). Note that we can't check the ur event to make that
// distinction since the command might still be unenqueued at this point.
bool PiEventExpected =
bool UrEventExpected =
(!DepEvent->isHost() && !DepEvent->isDefaultConstructed());
if (auto *DepCmd = DepEvent->getCommand())
PiEventExpected &= DepCmd->producesPiEvent();
UrEventExpected &= DepCmd->producesUrEvent();

if (!PiEventExpected) {
if (!UrEventExpected) {
// call to waitInternal() is in waitForPreparedHostEvents() as it's called
// from enqueue process functions
MPreparedHostDepsEvents.push_back(DepEvent);
Expand All @@ -737,7 +737,7 @@ context_impl *Command::getWorkerContext() const {
return &MQueue->getContextImpl();
}

bool Command::producesPiEvent() const { return true; }
bool Command::producesUrEvent() const { return true; }

bool Command::supportsPostEnqueueCleanup() const { return true; }

Expand Down Expand Up @@ -1008,7 +1008,7 @@ void AllocaCommandBase::emitInstrumentationData() {
#endif
}

bool AllocaCommandBase::producesPiEvent() const { return false; }
bool AllocaCommandBase::producesUrEvent() const { return false; }

bool AllocaCommandBase::supportsPostEnqueueCleanup() const { return false; }

Expand Down Expand Up @@ -1296,7 +1296,7 @@ void ReleaseCommand::printDot(std::ostream &Stream) const {
}
}

bool ReleaseCommand::producesPiEvent() const { return false; }
bool ReleaseCommand::producesUrEvent() const { return false; }

bool ReleaseCommand::supportsPostEnqueueCleanup() const { return false; }

Expand Down Expand Up @@ -1392,7 +1392,7 @@ void UnMapMemObject::emitInstrumentationData() {
#endif
}

bool UnMapMemObject::producesPiEvent() const {
bool UnMapMemObject::producesUrEvent() const {
// TODO remove this workaround once the batching issue is addressed in Level
// Zero adapter.
// Consider the following scenario on Level Zero:
Expand Down Expand Up @@ -1498,7 +1498,7 @@ context_impl *MemCpyCommand::getWorkerContext() const {
return &MWorkerQueue->getContextImpl();
}

bool MemCpyCommand::producesPiEvent() const {
bool MemCpyCommand::producesUrEvent() const {
// TODO remove this workaround once the batching issue is addressed in Level
// Zero adapter.
// Consider the following scenario on Level Zero:
Expand Down Expand Up @@ -1774,7 +1774,7 @@ void EmptyCommand::printDot(std::ostream &Stream) const {
}
}

bool EmptyCommand::producesPiEvent() const { return false; }
bool EmptyCommand::producesUrEvent() const { return false; }

void MemCpyCommandHost::printDot(std::ostream &Stream) const {
Stream << "\"" << this << "\" [style=filled, fillcolor=\"#B6A2EB\", label=\"";
Expand Down Expand Up @@ -3767,7 +3767,7 @@ ur_result_t ExecCGCommand::enqueueImpQueue() {
return UR_RESULT_ERROR_INVALID_OPERATION;
}

bool ExecCGCommand::producesPiEvent() const {
bool ExecCGCommand::producesUrEvent() const {
return !MCommandBuffer &&
MCommandGroup->getType() != CGType::CodeplayHostTask;
}
Expand Down Expand Up @@ -3865,7 +3865,7 @@ void UpdateCommandBufferCommand::printDot(std::ostream &Stream) const {
}

void UpdateCommandBufferCommand::emitInstrumentationData() {}
bool UpdateCommandBufferCommand::producesPiEvent() const { return false; }
bool UpdateCommandBufferCommand::producesUrEvent() const { return false; }

CGHostTask::CGHostTask(std::shared_ptr<HostTask> HostTask,
detail::queue_impl *Queue, detail::context_impl *Context,
Expand Down
16 changes: 8 additions & 8 deletions sycl/source/detail/scheduler/commands.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ class Command {
virtual context_impl *getWorkerContext() const;

/// Returns true iff the command produces a UR event on non-host devices.
virtual bool producesPiEvent() const;
virtual bool producesUrEvent() const;

/// Returns true iff this command can be freed by post enqueue cleanup.
virtual bool supportsPostEnqueueCleanup() const;
Expand Down Expand Up @@ -413,7 +413,7 @@ class EmptyCommand : public Command {

void emitInstrumentationData() override;

bool producesPiEvent() const final;
bool producesUrEvent() const final;

private:
ur_result_t enqueueImp() final;
Expand All @@ -432,7 +432,7 @@ class ReleaseCommand : public Command {

void printDot(std::ostream &Stream) const final;
void emitInstrumentationData() override;
bool producesPiEvent() const final;
bool producesUrEvent() const final;
bool supportsPostEnqueueCleanup() const final;
bool readyForCleanup() const final;

Expand All @@ -459,7 +459,7 @@ class AllocaCommandBase : public Command {

void emitInstrumentationData() override;

bool producesPiEvent() const final;
bool producesUrEvent() const final;

bool supportsPostEnqueueCleanup() const final;

Expand Down Expand Up @@ -555,7 +555,7 @@ class UnMapMemObject : public Command {
void printDot(std::ostream &Stream) const final;
const Requirement *getRequirement() const final { return &MDstReq; }
void emitInstrumentationData() override;
bool producesPiEvent() const final;
bool producesUrEvent() const final;

private:
ur_result_t enqueueImp() final;
Expand All @@ -577,7 +577,7 @@ class MemCpyCommand : public Command {
const Requirement *getRequirement() const final { return &MDstReq; }
void emitInstrumentationData() final;
context_impl *getWorkerContext() const final;
bool producesPiEvent() const final;
bool producesUrEvent() const final;

private:
ur_result_t enqueueImp() final;
Expand Down Expand Up @@ -653,7 +653,7 @@ class ExecCGCommand : public Command {
// is false.
bool MEventNeeded = true;

bool producesPiEvent() const final;
bool producesUrEvent() const final;

bool supportsPostEnqueueCleanup() const final;

Expand Down Expand Up @@ -709,7 +709,7 @@ class UpdateCommandBufferCommand : public Command {

void printDot(std::ostream &Stream) const final;
void emitInstrumentationData() final;
bool producesPiEvent() const final;
bool producesUrEvent() const final;

private:
ur_result_t enqueueImp() final;
Expand Down
4 changes: 2 additions & 2 deletions sycl/source/detail/ur_info_code.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ template <typename T> struct UrInfoCode;
#include <sycl/info/kernel_traits.def>
#include <sycl/info/platform_traits.def>
#include <sycl/info/queue_traits.def>
#define __SYCL_PARAM_TRAITS_SPEC_SPECIALIZED(DescType, Desc, ReturnT, PiCode) \
__SYCL_PARAM_TRAITS_SPEC(DescType, Desc, ReturnT, PiCode)
#define __SYCL_PARAM_TRAITS_SPEC_SPECIALIZED(DescType, Desc, ReturnT, UrCode) \
__SYCL_PARAM_TRAITS_SPEC(DescType, Desc, ReturnT, UrCode)
#include <sycl/info/device_traits.def>
#undef __SYCL_PARAM_TRAITS_SPEC_SPECIALIZED
#undef __SYCL_PARAM_TRAITS_SPEC
Expand Down
6 changes: 3 additions & 3 deletions sycl/source/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,17 +178,17 @@ __SYCL_EXPORT bool device::get_info_impl<info::device::image_support>() const {
return impl->template get_info<info::device::image_support>();
}

#define __SYCL_PARAM_TRAITS_SPEC(DescType, Desc, ReturnT, PiCode) \
#define __SYCL_PARAM_TRAITS_SPEC(DescType, Desc, ReturnT, UrCode) \
template __SYCL_EXPORT detail::ABINeutralT_t<ReturnT> \
device::get_info_impl<info::device::Desc>() const;

#define __SYCL_PARAM_TRAITS_SPEC_SPECIALIZED(DescType, Desc, ReturnT, PiCode)
#define __SYCL_PARAM_TRAITS_SPEC_SPECIALIZED(DescType, Desc, ReturnT, UrCode)

#include <sycl/info/device_traits.def>
#undef __SYCL_PARAM_TRAITS_SPEC_SPECIALIZED
#undef __SYCL_PARAM_TRAITS_SPEC

#define __SYCL_PARAM_TRAITS_SPEC(Namespace, DescType, Desc, ReturnT, PiCode) \
#define __SYCL_PARAM_TRAITS_SPEC(Namespace, DescType, Desc, ReturnT, UrCode) \
template __SYCL_EXPORT detail::ABINeutralT_t<ReturnT> \
device::get_info_impl<Namespace::info::DescType::Desc>() const;

Expand Down
4 changes: 2 additions & 2 deletions sycl/source/event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@ event::get_profiling_info() const {
return impl->template get_profiling_info<Param>();
}

#define __SYCL_PARAM_TRAITS_SPEC(DescType, Desc, ReturnT, PiCode) \
#define __SYCL_PARAM_TRAITS_SPEC(DescType, Desc, ReturnT, UrCode) \
template __SYCL_EXPORT ReturnT event::get_info<info::event::Desc>() const;

#include <sycl/info/event_traits.def>

#undef __SYCL_PARAM_TRAITS_SPEC

#define __SYCL_PARAM_TRAITS_SPEC(DescType, Desc, ReturnT, PiCode) \
#define __SYCL_PARAM_TRAITS_SPEC(DescType, Desc, ReturnT, UrCode) \
template __SYCL_EXPORT ReturnT \
event::get_profiling_info<info::DescType::Desc>() const;

Expand Down
8 changes: 4 additions & 4 deletions sycl/source/handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,15 +159,15 @@ fill_image_type(const ext::oneapi::experimental::image_descriptor &Desc,
// Fill image format
static ur_image_format_t
fill_format(const ext::oneapi::experimental::image_descriptor &Desc) {
ur_image_format_t PiFormat;
ur_image_format_t UrFormat;

PiFormat.channelType =
UrFormat.channelType =
sycl::_V1::detail::convertChannelType(Desc.channel_type);
PiFormat.channelOrder = sycl::detail::convertChannelOrder(
UrFormat.channelOrder = sycl::detail::convertChannelOrder(
sycl::_V1::ext::oneapi::experimental::detail::
get_image_default_channel_order(Desc.num_channels));

return PiFormat;
return UrFormat;
}

static void
Expand Down
4 changes: 2 additions & 2 deletions sycl/source/kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ kernel::get_info_impl() const {
return detail::convert_to_abi_neutral(impl->template get_info<Param>());
}

#define __SYCL_PARAM_TRAITS_SPEC(DescType, Desc, ReturnT, PiCode) \
#define __SYCL_PARAM_TRAITS_SPEC(DescType, Desc, ReturnT, UrCode) \
template __SYCL_EXPORT detail::ABINeutralT_t<ReturnT> \
kernel::get_info_impl<info::kernel::Desc>() const;

Expand Down Expand Up @@ -86,7 +86,7 @@ kernel::get_info(const device &Device, const range<3> &WGSize) const {
return impl->get_info<Param>(Device, WGSize);
}

#define __SYCL_PARAM_TRAITS_SPEC(DescType, Desc, ReturnT, PiCode) \
#define __SYCL_PARAM_TRAITS_SPEC(DescType, Desc, ReturnT, UrCode) \
template __SYCL_EXPORT ReturnT kernel::get_info<info::DescType::Desc>( \
const device &) const;

Expand Down
2 changes: 1 addition & 1 deletion sycl/source/platform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ ur_native_handle_t platform::getNative() const { return impl->getNative(); }

bool platform::has(aspect Aspect) const { return impl->has(Aspect); }

#define __SYCL_PARAM_TRAITS_SPEC(DescType, Desc, ReturnT, PiCode) \
#define __SYCL_PARAM_TRAITS_SPEC(DescType, Desc, ReturnT, UrCode) \
template __SYCL_EXPORT detail::ABINeutralT_t<ReturnT> \
platform::get_info_impl<info::platform::Desc>() const;

Expand Down
2 changes: 1 addition & 1 deletion sycl/unittests/Extensions/OneAPIProd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ static ur_result_t redefinedQueueFlush(void *) {
return UR_RESULT_SUCCESS;
}

TEST(OneAPIProdTest, PiQueueFlush) {
TEST(OneAPIProdTest, UrQueueFlush) {
sycl::unittest::UrMock<backend::ext_oneapi_level_zero> Mock;
sycl::platform Plt = sycl::platform();
mock::getCallbacks().set_replace_callback("urQueueFlush",
Expand Down
Loading
Loading