We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ec1f28d commit 81d20d8Copy full SHA for 81d20d8
offload/plugins-nextgen/amdgpu/src/rtl.cpp
@@ -1670,10 +1670,10 @@ struct AMDGPUStreamManagerTy final
1670
hsa_agent_t Agent;
1671
1672
/// The maximum number of queues.
1673
- int MaxNumQueues;
+ uint32_t MaxNumQueues;
1674
1675
/// The size of created queues.
1676
- int QueueSize;
+ uint32_t QueueSize;
1677
};
1678
1679
/// Abstract class that holds the common members of the actual kernel devices
@@ -1847,8 +1847,7 @@ struct AMDGPUDeviceTy : public GenericDeviceTy, AMDGenericDeviceTy {
1847
// Create an AMDGPU device with a device id and default AMDGPU grid values.
1848
AMDGPUDeviceTy(GenericPluginTy &Plugin, int32_t DeviceId, int32_t NumDevices,
1849
AMDHostDeviceTy &HostDevice, hsa_agent_t Agent)
1850
- : GenericDeviceTy(Plugin, DeviceId, NumDevices, {0}),
1851
- AMDGenericDeviceTy(),
+ : GenericDeviceTy(Plugin, DeviceId, NumDevices, {}), AMDGenericDeviceTy(),
1852
OMPX_NumQueues("LIBOMPTARGET_AMDGPU_NUM_HSA_QUEUES", 4),
1853
OMPX_QueueSize("LIBOMPTARGET_AMDGPU_HSA_QUEUE_SIZE", 512),
1854
OMPX_DefaultTeamsPerCU("LIBOMPTARGET_AMDGPU_TEAMS_PER_CU", 4),
@@ -2015,9 +2014,7 @@ struct AMDGPUDeviceTy : public GenericDeviceTy, AMDGenericDeviceTy {
2015
2014
return Plugin::success();
2016
}
2017
2018
- const uint64_t getStreamBusyWaitMicroseconds() const {
2019
- return OMPX_StreamBusyWait;
2020
- }
+ uint64_t getStreamBusyWaitMicroseconds() const { return OMPX_StreamBusyWait; }
2021
2022
Expected<std::unique_ptr<MemoryBuffer>>
2023
doJITPostProcessing(std::unique_ptr<MemoryBuffer> MB) const override {
offload/plugins-nextgen/common/src/PluginInterface.cpp
@@ -593,7 +593,7 @@ void *GenericKernelTy::prepareArgs(
593
Args[0] = &Ptrs[0];
594
595
596
- for (int I = KLEOffset; I < NumArgs; ++I) {
+ for (uint32_t I = KLEOffset; I < NumArgs; ++I) {
597
Ptrs[I] =
598
(void *)((intptr_t)ArgPtrs[I - KLEOffset] + ArgOffsets[I - KLEOffset]);
599
Args[I] = &Ptrs[I];
offload/src/LegacyAPI.cpp
@@ -88,7 +88,8 @@ EXTERN int __tgt_target_mapper(ident_t *Loc, int64_t DeviceId, void *HostPtr,
88
TIMESCOPE_WITH_IDENT(Loc);
89
OMPT_IF_BUILT(ReturnAddressSetterRAII RA(__builtin_return_address(0)));
90
KernelArgsTy KernelArgs{1, ArgNum, ArgsBase, Args, ArgSizes,
91
- ArgTypes, ArgNames, ArgMappers, 0};
+ ArgTypes, ArgNames, ArgMappers, 0, {},
92
+ {}, {}, 0};
93
return __tgt_target_kernel(Loc, DeviceId, -1, -1, HostPtr, &KernelArgs);
94
95
@@ -132,7 +133,8 @@ EXTERN int __tgt_target_teams_mapper(ident_t *Loc, int64_t DeviceId,
132
133
134
135
136
137
138
return __tgt_target_kernel(Loc, DeviceId, NumTeams, ThreadLimit, HostPtr,
139
&KernelArgs);
140
offload/src/OpenMP/API.cpp
@@ -642,7 +642,7 @@ EXTERN void *omp_get_mapped_ptr(const void *Ptr, int DeviceNum) {
642
return nullptr;
643
644
645
- size_t NumDevices = omp_get_initial_device();
+ int NumDevices = omp_get_initial_device();
646
if (DeviceNum == NumDevices) {
647
DP("Device %d is initial device, returning Ptr " DPxMOD ".\n",
648
DeviceNum, DPxPTR(Ptr));
offload/src/OpenMP/Mapping.cpp
@@ -314,9 +314,7 @@ TargetPointerResultTy MappingInfoTy::getTargetPointer(
314
315
// Notify the plugin about the new mapping.
316
if (Device.notifyDataMapped(HstPtrBegin, Size))
317
- return {{false /*IsNewEntry=*/, false /*IsHostPointer=*/},
318
- nullptr /*Entry=*/,
319
- nullptr /*TargetPointer=*/};
+ return TargetPointerResultTy{};
320
} else {
321
// This entry is not present and we did not create a new entry for it.
322
LR.TPR.Flags.IsPresent = false;
@@ -344,9 +342,7 @@ TargetPointerResultTy MappingInfoTy::getTargetPointer(
344
342
LR.TPR.TargetPointer = nullptr;
345
343
} else if (LR.TPR.getEntry()->addEventIfNecessary(Device, AsyncInfo) !=
346
OFFLOAD_SUCCESS)
347
348
349
350
351
// If not a host pointer and no present modifier, we need to wait for the
352
// event if it exists.
@@ -360,9 +356,7 @@ TargetPointerResultTy MappingInfoTy::getTargetPointer(
360
356
// If it fails to wait for the event, we need to return nullptr in
361
357
// case of any data race.
362
358
REPORT("Failed to wait for event " DPxMOD ".\n", DPxPTR(Event));
363
364
365
359
366
367
368
offload/src/omptarget.cpp
@@ -1750,7 +1750,7 @@ int target_replay(ident_t *Loc, DeviceTy &Device, void *HostPtr,
1750
TARGET_ALLOC_DEFAULT);
1751
Device.submitData(TgtPtr, DeviceMemory, DeviceMemorySize, AsyncInfo);
1752
1753
- KernelArgsTy KernelArgs = {0};
+ KernelArgsTy KernelArgs{};
1754
KernelArgs.Version = OMP_KERNEL_ARG_VERSION;
1755
KernelArgs.NumArgs = NumArgs;
1756
KernelArgs.Tripcount = LoopTripCount;
0 commit comments