mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Separate struct EnqueueOperation declaration and implementation
Change-Id: I537660867a1c98f957280237c14b7a1554fce3db
This commit is contained in:
committed by
sys_ocldev
parent
2374b27bf5
commit
e51cb6bd0b
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Intel Corporation
|
||||
* Copyright (c) 2017 - 2018, Intel Corporation
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@@ -96,12 +96,12 @@ HWTEST_F(ProfilingTests, GIVENCommandQueueWithProfilingAndForWorkloadWithKernelW
|
||||
uint64_t requiredSize = 2 * sizeof(PIPE_CONTROL) + 2 * sizeof(MI_STORE_REGISTER_MEM) + sizeof(GPGPU_WALKER) + KernelCommandsHelper<FamilyType>::getSizeRequiredCS();
|
||||
|
||||
auto &commandStreamNDRangeKernel = getCommandStream<FamilyType, CL_COMMAND_NDRANGE_KERNEL>(*pCmdQ, true, false, nullptr);
|
||||
auto expectedSizeCS = EnqueueOperation<FamilyType, CL_COMMAND_NDRANGE_KERNEL>::getSizeRequiredCS(true, false, *pCmdQ, nullptr);
|
||||
auto expectedSizeCS = EnqueueOperation<FamilyType>::getSizeRequiredCS(CL_COMMAND_NDRANGE_KERNEL, true, false, *pCmdQ, nullptr);
|
||||
EXPECT_GE(expectedSizeCS, requiredSize);
|
||||
EXPECT_GE(commandStreamNDRangeKernel.getAvailableSpace(), requiredSize);
|
||||
|
||||
auto &commandStreamTask = getCommandStream<FamilyType, CL_COMMAND_TASK>(*pCmdQ, true, false, nullptr);
|
||||
expectedSizeCS = EnqueueOperation<FamilyType, CL_COMMAND_TASK>::getSizeRequiredCS(true, false, *pCmdQ, nullptr);
|
||||
expectedSizeCS = EnqueueOperation<FamilyType>::getSizeRequiredCS(CL_COMMAND_TASK, true, false, *pCmdQ, nullptr);
|
||||
EXPECT_GE(expectedSizeCS, requiredSize);
|
||||
EXPECT_GE(commandStreamTask.getAvailableSpace(), requiredSize);
|
||||
}
|
||||
@@ -114,12 +114,12 @@ HWTEST_F(ProfilingTests, GIVENCommandQueueWithProfilingAndForWorkloadWithNoKerne
|
||||
uint64_t requiredSize = 2 * sizeof(PIPE_CONTROL) + 4 * sizeof(MI_STORE_REGISTER_MEM);
|
||||
|
||||
auto &commandStreamMigrateMemObjects = getCommandStream<FamilyType, CL_COMMAND_MIGRATE_MEM_OBJECTS>(*pCmdQ, true, false, nullptr);
|
||||
auto expectedSizeCS = EnqueueOperation<FamilyType, CL_COMMAND_MIGRATE_MEM_OBJECTS>::getSizeRequiredCS(true, false, *pCmdQ, nullptr);
|
||||
auto expectedSizeCS = EnqueueOperation<FamilyType>::getSizeRequiredCS(CL_COMMAND_MIGRATE_MEM_OBJECTS, true, false, *pCmdQ, nullptr);
|
||||
EXPECT_GE(expectedSizeCS, requiredSize);
|
||||
EXPECT_GE(commandStreamMigrateMemObjects.getAvailableSpace(), requiredSize);
|
||||
|
||||
auto &commandStreamMarker = getCommandStream<FamilyType, CL_COMMAND_MARKER>(*pCmdQ, true, false, nullptr);
|
||||
expectedSizeCS = EnqueueOperation<FamilyType, CL_COMMAND_MARKER>::getSizeRequiredCS(true, false, *pCmdQ, nullptr);
|
||||
expectedSizeCS = EnqueueOperation<FamilyType>::getSizeRequiredCS(CL_COMMAND_MARKER, true, false, *pCmdQ, nullptr);
|
||||
EXPECT_GE(expectedSizeCS, requiredSize);
|
||||
EXPECT_GE(commandStreamMarker.getAvailableSpace(), requiredSize);
|
||||
}
|
||||
@@ -138,7 +138,7 @@ HWTEST_F(ProfilingTests, GIVENCommandQueueWithProfilingAndForWorkloadWithTwoKern
|
||||
MultiDispatchInfo multiDispatchInfo(dispatchInfo);
|
||||
multiDispatchInfo.push(dispatchInfo);
|
||||
auto &commandStreamTask = getCommandStream<FamilyType, CL_COMMAND_TASK>(*pCmdQ, true, false, nullptr);
|
||||
auto expectedSizeCS = EnqueueOperation<FamilyType, CL_COMMAND_TASK>::getTotalSizeRequiredCS(true, false, *pCmdQ, multiDispatchInfo);
|
||||
auto expectedSizeCS = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(true, false, *pCmdQ, multiDispatchInfo);
|
||||
EXPECT_GE(expectedSizeCS, requiredSize);
|
||||
EXPECT_GE(commandStreamTask.getAvailableSpace(), requiredSize);
|
||||
}
|
||||
@@ -462,12 +462,12 @@ HWTEST_F(ProfilingWithPerfCountersTests, GIVENCommandQueueWithProfilingPerfCount
|
||||
requiredSize += 2 * sizeof(PIPE_CONTROL) + 3 * sizeof(MI_STORE_REGISTER_MEM) + OCLRT::INSTR_GENERAL_PURPOSE_COUNTERS_COUNT * sizeof(MI_STORE_REGISTER_MEM) + sizeof(MI_REPORT_PERF_COUNT) + pCmdQ->getPerfCountersUserRegistersNumber() * sizeof(MI_STORE_REGISTER_MEM);
|
||||
|
||||
auto &commandStreamNDRangeKernel = getCommandStream<FamilyType, CL_COMMAND_NDRANGE_KERNEL>(*pCmdQ, true, true, nullptr);
|
||||
auto expectedSizeCS = EnqueueOperation<FamilyType, CL_COMMAND_NDRANGE_KERNEL>::getSizeRequiredCS(true, true, *pCmdQ, nullptr);
|
||||
auto expectedSizeCS = EnqueueOperation<FamilyType>::getSizeRequiredCS(CL_COMMAND_NDRANGE_KERNEL, true, true, *pCmdQ, nullptr);
|
||||
EXPECT_GE(expectedSizeCS, requiredSize);
|
||||
EXPECT_GE(commandStreamNDRangeKernel.getAvailableSpace(), requiredSize);
|
||||
|
||||
auto &commandStreamTask = getCommandStream<FamilyType, CL_COMMAND_TASK>(*pCmdQ, true, true, nullptr);
|
||||
expectedSizeCS = EnqueueOperation<FamilyType, CL_COMMAND_TASK>::getSizeRequiredCS(true, true, *pCmdQ, nullptr);
|
||||
expectedSizeCS = EnqueueOperation<FamilyType>::getSizeRequiredCS(CL_COMMAND_TASK, true, true, *pCmdQ, nullptr);
|
||||
EXPECT_GE(expectedSizeCS, requiredSize);
|
||||
EXPECT_GE(commandStreamTask.getAvailableSpace(), requiredSize);
|
||||
bool retVal = false;
|
||||
@@ -487,12 +487,12 @@ HWTEST_F(ProfilingWithPerfCountersTests, GIVENCommandQueueWithProfilingPerfCount
|
||||
uint64_t requiredSize = 2 * sizeof(PIPE_CONTROL) + 4 * sizeof(MI_STORE_REGISTER_MEM);
|
||||
|
||||
auto &commandStreamMigrateMemObjects = getCommandStream<FamilyType, CL_COMMAND_MIGRATE_MEM_OBJECTS>(*pCmdQ, true, true, nullptr);
|
||||
auto expectedSizeCS = EnqueueOperation<FamilyType, CL_COMMAND_MIGRATE_MEM_OBJECTS>::getSizeRequiredCS(true, true, *pCmdQ, nullptr);
|
||||
auto expectedSizeCS = EnqueueOperation<FamilyType>::getSizeRequiredCS(CL_COMMAND_MIGRATE_MEM_OBJECTS, true, true, *pCmdQ, nullptr);
|
||||
EXPECT_GE(expectedSizeCS, requiredSize);
|
||||
EXPECT_GE(commandStreamMigrateMemObjects.getAvailableSpace(), requiredSize);
|
||||
|
||||
auto &commandStreamMarker = getCommandStream<FamilyType, CL_COMMAND_MARKER>(*pCmdQ, true, true, nullptr);
|
||||
expectedSizeCS = EnqueueOperation<FamilyType, CL_COMMAND_MARKER>::getSizeRequiredCS(true, true, *pCmdQ, nullptr);
|
||||
expectedSizeCS = EnqueueOperation<FamilyType>::getSizeRequiredCS(CL_COMMAND_MARKER, true, true, *pCmdQ, nullptr);
|
||||
EXPECT_GE(expectedSizeCS, requiredSize);
|
||||
EXPECT_GE(commandStreamMarker.getAvailableSpace(), requiredSize);
|
||||
|
||||
@@ -521,7 +521,7 @@ HWTEST_F(ProfilingWithPerfCountersTests, GIVENCommandQueueWithProfilingPerfCount
|
||||
MultiDispatchInfo multiDispatchInfo(dispatchInfo);
|
||||
multiDispatchInfo.push(dispatchInfo);
|
||||
auto &commandStreamTask = getCommandStream<FamilyType, CL_COMMAND_TASK>(*pCmdQ, true, true, nullptr);
|
||||
auto expectedSizeCS = EnqueueOperation<FamilyType, CL_COMMAND_TASK>::getTotalSizeRequiredCS(true, true, *pCmdQ, multiDispatchInfo);
|
||||
auto expectedSizeCS = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(true, true, *pCmdQ, multiDispatchInfo);
|
||||
EXPECT_GE(expectedSizeCS, requiredSize);
|
||||
EXPECT_GE(commandStreamTask.getAvailableSpace(), requiredSize);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user