Skip to content

Commit 2b15bab

Browse files
committed
Revert the getDeviceFromHandler removal. This change will be introduced
in another PR.
1 parent bdcd30e commit 2b15bab

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

sycl/source/handler.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2012,11 +2012,10 @@ void handler::setUserFacingNodeType(ext::oneapi::experimental::node_type Type) {
20122012
}
20132013

20142014
std::optional<std::array<size_t, 3>> handler::getMaxWorkGroups() {
2015-
const auto &DeviceImpl =
2016-
MQueue ? MQueue->getDeviceImplPtr() : impl->MGraph->getDeviceImplPtr();
2015+
auto Dev = detail::getSyclObjImpl(detail::getDeviceFromHandler(*this));
20172016
std::array<size_t, 3> UrResult = {};
2018-
auto Ret = DeviceImpl->getAdapter()->call_nocheck<UrApiKind::urDeviceGetInfo>(
2019-
DeviceImpl->getHandleRef(),
2017+
auto Ret = Dev->getAdapter()->call_nocheck<UrApiKind::urDeviceGetInfo>(
2018+
Dev->getHandleRef(),
20202019
UrInfoCode<
20212020
ext::oneapi::experimental::info::device::max_work_groups<3>>::value,
20222021
sizeof(UrResult), &UrResult, nullptr);

0 commit comments

Comments
 (0)