Skip to content

Commit 89e8d9d

Browse files
committed
Formatting
1 parent b78c225 commit 89e8d9d

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

source/adapters/level_zero/kernel.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,8 @@ ur_result_t urKernelCreate(
598598

599599
for (auto &Dev : Program->AssociatedDevices) {
600600
auto ZeDevice = Dev->ZeDevice;
601-
// Program may be associated with all devices from the context but built only for subset of devices.
601+
// Program may be associated with all devices from the context but built
602+
// only for subset of devices.
602603
if (Program->getState(ZeDevice) != ur_program_handle_t_::state::Exe)
603604
continue;
604605

@@ -633,7 +634,7 @@ ur_result_t urKernelCreate(
633634
for (auto ZeSubDevice : ZeSubDevices) {
634635
(*RetKernel)->ZeKernelMap[ZeSubDevice] = ZeKernel;
635636
}
636-
}
637+
}
637638
// There is no any successfully built executable for program.
638639
if ((*RetKernel)->ZeKernelMap.empty())
639640
return UR_RESULT_ERROR_INVALID_PROGRAM_EXECUTABLE;

source/adapters/level_zero/program.cpp

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,9 @@ ur_result_t urProgramCreateWithBinaryExp(
122122
ur_context_handle_t hContext, ///< [in] handle of the context instance
123123
uint32_t numDevices, ///< [in] number of devices
124124
ur_device_handle_t
125-
*phDevices, ///< [in][range(0, numDevices)] a pointer to a list of
126-
///< device handles. The binaries are loaded for devices
127-
///< specified in this list.
125+
*phDevices, ///< [in][range(0, numDevices)] a pointer to a list of
126+
///< device handles. The binaries are loaded for devices
127+
///< specified in this list.
128128
size_t *pLengths, ///< [in][range(0, numDevices)] array of sizes of program
129129
///< binaries specified by `pBinaries` (in bytes).
130130
const uint8_t *
@@ -472,8 +472,6 @@ ur_result_t urProgramLinkExp(
472472
}
473473
}
474474

475-
// TODO: Use the module of the first device as the interop module because of
476-
// lack of multi-device support for interop case.
477475
ur_program_handle_t_ *UrProgram = new ur_program_handle_t_(hContext);
478476
*phProgram = reinterpret_cast<ur_program_handle_t>(UrProgram);
479477
for (uint32_t i = 0; i < numDevices; i++) {
@@ -488,12 +486,13 @@ ur_result_t urProgramLinkExp(
488486
// here. Clear values of the previous device first.
489487
BuildFlagPtrs.clear();
490488
for (uint32_t I = 0; I < count; I++) {
491-
BuildFlagPtrs.push_back(phPrograms[I]->getBuildOptions(ZeDevice).c_str());
489+
BuildFlagPtrs.push_back(
490+
phPrograms[I]->getBuildOptions(ZeDevice).c_str());
492491
}
493492
ZeExtModuleDesc.pBuildFlags = BuildFlagPtrs.data();
494493
if (count == 1)
495-
ZeModuleDesc.pBuildFlags = ZeExtModuleDesc.pBuildFlags[0];
496-
494+
ZeModuleDesc.pBuildFlags = ZeExtModuleDesc.pBuildFlags[0];
495+
497496
ze_result_t ZeResult =
498497
ZE_CALL_NOCHECK(zeModuleCreate, (ZeContext, ZeDevice, &ZeModuleDesc,
499498
&ZeModule, &ZeBuildLog));

source/adapters/level_zero/program.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ struct ur_program_handle_t_ : _ur_object {
106106
ur_program_handle_t_([[maybe_unused]] state St, ur_context_handle_t Context,
107107
ze_module_handle_t InteropZeModule)
108108
: Context{Context}, NativeProperties{nullptr}, OwnZeModule{true},
109-
AssociatedDevices({Context->getDevices()[0]}),
110-
InteropZeModule{InteropZeModule} {}
109+
AssociatedDevices({Context->getDevices()[0]}), InteropZeModule{
110+
InteropZeModule} {}
111111

112112
// Construct a program in Exe state (interop).
113113
// TODO: Currently it is not possible to get the device associated with the
@@ -117,8 +117,8 @@ struct ur_program_handle_t_ : _ur_object {
117117
ur_program_handle_t_([[maybe_unused]] state St, ur_context_handle_t Context,
118118
ze_module_handle_t InteropZeModule, bool OwnZeModule)
119119
: Context{Context}, NativeProperties{nullptr}, OwnZeModule{OwnZeModule},
120-
AssociatedDevices({Context->getDevices()[0]}),
121-
InteropZeModule{InteropZeModule} {
120+
AssociatedDevices({Context->getDevices()[0]}), InteropZeModule{
121+
InteropZeModule} {
122122
// TODO: Currently it is not possible to understand the device associated
123123
// with provided ZeModule. So we can't set the state on that device to Exe.
124124
}

0 commit comments

Comments
 (0)