File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -919,6 +919,10 @@ class graph_impl : public std::enable_shared_from_this<graph_impl> {
919919 // / @return Device associated with graph.
920920 sycl::device getDevice () const { return MDevice; }
921921
922+ const DeviceImplPtr &getDeviceImplPtr () const {
923+ return getSyclObjImpl (MDevice);
924+ }
925+
922926 // / List of root nodes.
923927 std::set<std::weak_ptr<node_impl>, std::owner_less<std::weak_ptr<node_impl>>>
924928 MRoots;
Original file line number Diff line number Diff line change @@ -2012,8 +2012,8 @@ void handler::setUserFacingNodeType(ext::oneapi::experimental::node_type Type) {
20122012}
20132013
20142014std::optional<std::array<size_t , 3 >> handler::getMaxWorkGroups () {
2015- device Device = detail::getDeviceFromHandler (* this );
2016- const auto &DeviceImpl = detail::getSyclObjImpl (Device );
2015+ const auto &DeviceImpl =
2016+ MQueue ? MQueue-> getDeviceImplPtr () : impl-> MGraph -> getDeviceImplPtr ( );
20172017 std::array<size_t , 3 > UrResult = {};
20182018 auto Ret = DeviceImpl->getAdapter ()->call_nocheck <UrApiKind::urDeviceGetInfo>(
20192019 DeviceImpl->getHandleRef (),
You can’t perform that action at this time.
0 commit comments