@@ -119,19 +119,19 @@ static bool IsBannedPlatform(platform Platform) {
119
119
// replace uses of this with a helper in adapter object, the adapter
120
120
// objects will own the ur adapter handles and they'll need to pass them to
121
121
// urPlatformsGet - so urPlatformsGet will need to be wrapped with a helper
122
- std::vector<platform> platform_impl::getAdapterPlatforms (AdapterPtr &Adapter,
122
+ std::vector<platform> platform_impl::getAdapterPlatforms (adapter_impl &Adapter,
123
123
bool Supported) {
124
124
std::vector<platform> Platforms;
125
125
126
- auto UrPlatforms = Adapter-> getUrPlatforms ();
126
+ auto UrPlatforms = Adapter. getUrPlatforms ();
127
127
128
128
if (UrPlatforms.empty ()) {
129
129
return Platforms;
130
130
}
131
131
132
132
for (const auto &UrPlatform : UrPlatforms) {
133
133
platform Platform = detail::createSyclObjFromImpl<platform>(
134
- getOrMakePlatformImpl (UrPlatform, * Adapter));
134
+ getOrMakePlatformImpl (UrPlatform, Adapter));
135
135
const bool IsBanned = IsBannedPlatform (Platform);
136
136
bool HasAnyDevices = false ;
137
137
@@ -168,12 +168,12 @@ std::vector<platform> platform_impl::get_platforms() {
168
168
169
169
// See which platform we want to be served by which adapter.
170
170
// There should be just one adapter serving each backend.
171
- std::vector<AdapterPtr > &Adapters = ur::initializeUr ();
172
- std::vector<std::pair<platform, AdapterPtr >> PlatformsWithAdapter;
171
+ std::vector<adapter_impl * > &Adapters = ur::initializeUr ();
172
+ std::vector<std::pair<platform, adapter_impl * >> PlatformsWithAdapter;
173
173
174
174
// Then check backend-specific adapters
175
175
for (auto &Adapter : Adapters) {
176
- const auto &AdapterPlatforms = getAdapterPlatforms (Adapter);
176
+ const auto &AdapterPlatforms = getAdapterPlatforms (* Adapter);
177
177
for (const auto &P : AdapterPlatforms) {
178
178
PlatformsWithAdapter.push_back ({P, Adapter});
179
179
}
@@ -504,13 +504,13 @@ platform_impl::get_devices(info::device_type DeviceType) const {
504
504
// analysis. Doing adjustment by simple copy of last device num from
505
505
// previous platform.
506
506
// Needs non const adapter reference.
507
- std::vector<AdapterPtr > &Adapters = ur::initializeUr ();
507
+ std::vector<adapter_impl * > &Adapters = ur::initializeUr ();
508
508
auto It = std::find_if (Adapters.begin (), Adapters.end (),
509
- [&Platform = MPlatform](AdapterPtr &Adapter) {
509
+ [&Platform = MPlatform](adapter_impl * &Adapter) {
510
510
return Adapter->containsUrPlatform (Platform);
511
511
});
512
512
if (It != Adapters.end ()) {
513
- AdapterPtr &Adapter = *It;
513
+ adapter_impl * &Adapter = *It;
514
514
std::lock_guard<std::mutex> Guard (*Adapter->getAdapterMutex ());
515
515
Adapter->adjustLastDeviceId (MPlatform);
516
516
}
@@ -530,7 +530,7 @@ platform_impl::get_devices(info::device_type DeviceType) const {
530
530
531
531
// Filter out devices that are not present in the SYCL_DEVICE_ALLOWLIST
532
532
if (SYCLConfig<SYCL_DEVICE_ALLOWLIST>::get ())
533
- applyAllowList (UrDevices, MPlatform, MAdapter);
533
+ applyAllowList (UrDevices, MPlatform, * MAdapter);
534
534
535
535
// The first step is to filter out devices that are not compatible with
536
536
// ONEAPI_DEVICE_SELECTOR. This is also the mechanism by which top level
0 commit comments