mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 05:56:36 +08:00
refactor: rename default descriptor names
move them out of L0 API version check Related-To: NEO-14560 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
5205c39008
commit
1e7c9ee2e9
@@ -100,7 +100,7 @@ ze_result_t ContextImp::allocHostMem(const ze_host_mem_alloc_desc_t *hostDesc,
|
||||
size_t alignment,
|
||||
void **ptr) {
|
||||
|
||||
auto hostMemDesc = hostDesc ? hostDesc : &defaultHostMemDesc;
|
||||
auto hostMemDesc = hostDesc ? hostDesc : &defaultIntelHostMemDesc;
|
||||
|
||||
if (NEO::debugManager.flags.ForceExtendedUSMBufferSize.get() >= 1) {
|
||||
size += (MemoryConstants::pageSize * NEO::debugManager.flags.ForceExtendedUSMBufferSize.get());
|
||||
@@ -251,7 +251,7 @@ ze_result_t ContextImp::allocDeviceMem(ze_device_handle_t hDevice,
|
||||
size_t size,
|
||||
size_t alignment, void **ptr) {
|
||||
|
||||
auto deviceMemDesc = deviceDesc ? deviceDesc : &defaultDeviceMemDesc;
|
||||
auto deviceMemDesc = deviceDesc ? deviceDesc : &defaultIntelDeviceMemDesc;
|
||||
|
||||
if (NEO::debugManager.flags.ForceExtendedUSMBufferSize.get() >= 1) {
|
||||
size += (MemoryConstants::pageSize * NEO::debugManager.flags.ForceExtendedUSMBufferSize.get());
|
||||
@@ -380,8 +380,8 @@ ze_result_t ContextImp::allocSharedMem(ze_device_handle_t hDevice,
|
||||
size_t alignment,
|
||||
void **ptr) {
|
||||
|
||||
auto deviceMemDesc = deviceDesc ? deviceDesc : &defaultDeviceMemDesc;
|
||||
auto hostMemDesc = hostDesc ? hostDesc : &defaultHostMemDesc;
|
||||
auto deviceMemDesc = deviceDesc ? deviceDesc : &defaultIntelDeviceMemDesc;
|
||||
auto hostMemDesc = hostDesc ? hostDesc : &defaultIntelHostMemDesc;
|
||||
|
||||
if (NEO::debugManager.flags.ForceExtendedUSMBufferSize.get() >= 1) {
|
||||
size += (MemoryConstants::pageSize * NEO::debugManager.flags.ForceExtendedUSMBufferSize.get());
|
||||
|
||||
@@ -300,7 +300,7 @@ ze_result_t DeviceImp::createInternalCommandList(const ze_command_list_desc_t *d
|
||||
ze_result_t DeviceImp::createCommandListImmediate(const ze_command_queue_desc_t *desc,
|
||||
ze_command_list_handle_t *phCommandList) {
|
||||
|
||||
ze_command_queue_desc_t commandQueueDesc = defaultCommandQueueDesc;
|
||||
ze_command_queue_desc_t commandQueueDesc = defaultIntelCommandQueueDesc;
|
||||
|
||||
if (desc) {
|
||||
commandQueueDesc = *desc;
|
||||
|
||||
@@ -20,14 +20,14 @@ void executeKernelAndValidate(ze_context_handle_t context, uint32_t deviceIdentf
|
||||
}
|
||||
ze_command_list_handle_t cmdList;
|
||||
auto device = LevelZeroBlackBoxTests::zerTranslateIdentifierToDeviceHandleFunc(deviceIdentfier);
|
||||
SUCCESS_OR_TERMINATE(zeCommandListCreateImmediate(context, device, &defaultCommandQueueDesc, &cmdList));
|
||||
SUCCESS_OR_TERMINATE(zeCommandListCreateImmediate(context, device, &defaultIntelCommandQueueDesc, &cmdList));
|
||||
|
||||
constexpr ze_group_count_t groupCounts{16, 1, 1};
|
||||
|
||||
// Create output buffer
|
||||
void *dstBuffer = nullptr;
|
||||
constexpr size_t allocSize = groupCounts.groupCountX * sizeof(uint32_t) * 2;
|
||||
SUCCESS_OR_TERMINATE(zeMemAllocShared(context, &defaultDeviceMemDesc, &defaultHostMemDesc, allocSize, sizeof(uint32_t), device, &dstBuffer));
|
||||
SUCCESS_OR_TERMINATE(zeMemAllocShared(context, &defaultIntelDeviceMemDesc, &defaultIntelHostMemDesc, allocSize, sizeof(uint32_t), device, &dstBuffer));
|
||||
|
||||
std::string buildLog;
|
||||
auto spirV = LevelZeroBlackBoxTests::compileToSpirV(LevelZeroBlackBoxTests::slmArgKernelSrc, "", buildLog);
|
||||
|
||||
@@ -122,7 +122,7 @@ TEST_F(DefaultDescriptorWithoutBlitterTest, givenDeviceWithoutBlitterSupportWhen
|
||||
|
||||
TEST_F(DefaultDescriptorWithoutBlitterTest, givenDeviceWithoutBlitterSupportWhenCreatingCommandListImmediateWithDefaultDescriptorThenInOrderAsyncCmdListWithoutCopyOffloadIsCreated) {
|
||||
ze_command_list_handle_t hCommandList = {};
|
||||
ze_result_t result = context->createCommandListImmediate(device, &defaultCommandQueueDesc, &hCommandList);
|
||||
ze_result_t result = context->createCommandListImmediate(device, &defaultIntelCommandQueueDesc, &hCommandList);
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, result);
|
||||
|
||||
auto commandList = CommandList::whiteboxCast(L0::CommandList::fromHandle(hCommandList));
|
||||
|
||||
@@ -5151,7 +5151,7 @@ HWTEST2_F(EventTimestampTest, givenAppendMemoryCopyIsCalledWhenCpuCopyIsUsedAndC
|
||||
TEST_F(EventTests, givenDefaultDescriptorWhenCreatingCbEvent2ThenEventWithNoProfilingAndSignalScopeHostAndDeviceScopeWaitIsCreated) {
|
||||
ze_event_handle_t handle = nullptr;
|
||||
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, zexCounterBasedEventCreate2(context, device, &defaultCounterBasedEventDesc, &handle));
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, zexCounterBasedEventCreate2(context, device, &defaultIntelCounterBasedEventDesc, &handle));
|
||||
|
||||
auto eventObj = Event::fromHandle(handle);
|
||||
EXPECT_TRUE(eventObj->isCounterBasedExplicitlyEnabled());
|
||||
|
||||
@@ -860,7 +860,7 @@ TEST_F(MemoryTest, whenAllocatingHostMemoryWithDefaultDescriptorThenCachedResour
|
||||
size_t alignment = 1u;
|
||||
void *ptr = nullptr;
|
||||
|
||||
ze_result_t result = context->allocHostMem(&defaultHostMemDesc, size, alignment, &ptr);
|
||||
ze_result_t result = context->allocHostMem(&defaultIntelHostMemDesc, size, alignment, &ptr);
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, result);
|
||||
EXPECT_NE(nullptr, ptr);
|
||||
|
||||
@@ -878,7 +878,7 @@ TEST_F(MemoryTest, whenAllocatingDeviceMemoryWithDefaultDescriptorThenCachedReso
|
||||
void *ptr = nullptr;
|
||||
|
||||
ze_result_t result = context->allocDeviceMem(device->toHandle(),
|
||||
&defaultDeviceMemDesc,
|
||||
&defaultIntelDeviceMemDesc,
|
||||
size, alignment, &ptr);
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, result);
|
||||
EXPECT_NE(nullptr, ptr);
|
||||
@@ -897,8 +897,8 @@ TEST_F(MemoryTest, whenAllocatingSharedMemoryWithDefaultDescriptorsThenCachedRes
|
||||
void *ptr = nullptr;
|
||||
|
||||
ze_result_t result = context->allocSharedMem(device->toHandle(),
|
||||
&defaultDeviceMemDesc,
|
||||
&defaultHostMemDesc,
|
||||
&defaultIntelDeviceMemDesc,
|
||||
&defaultIntelHostMemDesc,
|
||||
size, alignment, &ptr);
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, result);
|
||||
EXPECT_NE(nullptr, ptr);
|
||||
|
||||
Reference in New Issue
Block a user