Skip to content

Commit c238a4d

Browse files
Add support for Cannon Lake (Gen10) platform
Change-Id: I0e63960887cdae9ba74c1ba91ad27101e22b458a
1 parent 24ba7a0 commit c238a4d

File tree

89 files changed

+10612
-7
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+10612
-7
lines changed

manifests/manifest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ components:
1717
branch: infra
1818
clean_on_sync: true
1919
dest_dir: infra
20-
revision: 07655b0a0ddec035e6f31cc42b21cf411b20cbc4
20+
revision: 137cb4cb7547c6effdab84108ac7734ee1b8abf7
2121
type: git
2222
internal:
2323
branch: master

platforms.cmake

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ set(ALL_GEN_TYPES "")
2424

2525
list(APPEND ALL_GEN_TYPES "GEN8")
2626
list(APPEND ALL_GEN_TYPES "GEN9")
27+
list(APPEND ALL_GEN_TYPES "GEN10")
2728

2829
set(ALL_GEN_TYPES_REVERSED ${ALL_GEN_TYPES})
2930
list(REVERSE ALL_GEN_TYPES_REVERSED)
@@ -169,6 +170,7 @@ endmacro()
169170

170171
SET_FLAGS_FOR("GEN8" "BDW")
171172
SET_FLAGS_FOR("GEN9" "SKL" "KBL" "BXT" "GLK" "CFL")
173+
SET_FLAGS_FOR("GEN10" "CNL")
172174

173175
# Init lists
174176
INIT_LIST("FAMILY_NAME" "TESTED")
@@ -250,6 +252,19 @@ if(SUPPORT_GEN9)
250252
endif()
251253
endif(SUPPORT_GEN9)
252254

255+
if(SUPPORT_GEN10)
256+
ADD_PLATFORM_FOR_GEN("SUPPORTED" "GEN10" "CNL" "CORE")
257+
ADD_PLATFORM_FOR_GEN("SUPPORTED_2_0" "GEN10" "CNL" "CORE")
258+
if(TESTS_GEN10)
259+
ADD_ITEM_FOR_GEN("FAMILY_NAME" "TESTED" "GEN10" "CNLFamily")
260+
ADD_ITEM_FOR_GEN("PLATFORMS" "TESTED" "GEN10" "CNL")
261+
ADD_ITEM_FOR_GEN("PLATFORMS" "TESTED_APPVERIFIER" "GEN10" "CNL")
262+
ADD_ITEM_FOR_GEN("CONFIGURATIONS" "AUB_TESTS" "GEN10" "cnl/2/5/8")
263+
ADD_ITEM_FOR_GEN("CONFIGURATIONS" "MT_TESTS" "GEN10" "cnl/2/5/8")
264+
ADD_ITEM_FOR_GEN("CONFIGURATIONS" "UNIT_TESTS" "GEN10" "cnl/2/5/8")
265+
endif()
266+
endif()
267+
253268
# Get platform lists, flag definition and set default platforms
254269
GET_AVAILABLE_PLATFORMS("SUPPORTED" "SUPPORT" ALL_AVAILABLE_SUPPORTED_PLATFORMS)
255270
GET_AVAILABLE_PLATFORMS("TESTED" "TESTS" ALL_AVAILABLE_TESTED_PLATFORMS)

runtime/aub_mem_dump/aub_services.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ struct CmdServicesMemTraceVersion {
9898
Hsw = 9,
9999
Bxt = 14,
100100
Sbr = 6,
101+
Cnl = 15,
101102
Ivb = 7,
102103
Chv = 13,
103104
El = 4,
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
/*
2+
* Copyright (c) 2017 - 2018, Intel Corporation
3+
*
4+
* Permission is hereby granted, free of charge, to any person obtaining a
5+
* copy of this software and associated documentation files (the "Software"),
6+
* to deal in the Software without restriction, including without limitation
7+
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
8+
* and/or sell copies of the Software, and to permit persons to whom the
9+
* Software is furnished to do so, subject to the following conditions:
10+
*
11+
* The above copyright notice and this permission notice shall be included
12+
* in all copies or substantial portions of the Software.
13+
*
14+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17+
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
18+
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19+
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20+
* OTHER DEALINGS IN THE SOFTWARE.
21+
*/
22+
23+
#include "CL/cl.h"
24+
#include "runtime/builtin_kernels_simulation/opencl_c.h"
25+
#include "runtime/builtin_kernels_simulation/scheduler_simulation.h"
26+
#include "runtime/builtin_kernels_simulation/scheduler_simulation.inl"
27+
#include "runtime/memory_manager/graphics_allocation.h"
28+
#include "runtime/gen10/hw_cmds.h"
29+
#include "runtime/execution_model/device_enqueue.h"
30+
31+
using namespace OCLRT;
32+
using namespace BuiltinKernelsSimulation;
33+
34+
namespace Gen10SchedulerSimulation {
35+
36+
#define SCHEDULER_EMULATION
37+
38+
uint GetNextPowerof2(uint number);
39+
40+
float __intel__getProfilingTimerResolution() {
41+
return static_cast<float>(DEFAULT_GEN10_PLATFORM::hwInfo.capabilityTable.defaultProfilingTimerResolution);
42+
}
43+
44+
#include "runtime/gen10/device_enqueue.h"
45+
#include "runtime/gen10/scheduler_definitions.h"
46+
#include "runtime/gen10/scheduler_igdrcl_built_in.inl"
47+
#include "runtime/scheduler/scheduler.cl"
48+
} // namespace Gen10SchedulerSimulation
49+
50+
namespace BuiltinKernelsSimulation {
51+
52+
template <>
53+
void SchedulerSimulation<CNLFamily>::startScheduler(uint32_t index,
54+
GraphicsAllocation *queue,
55+
GraphicsAllocation *commandsStack,
56+
GraphicsAllocation *eventsPool,
57+
GraphicsAllocation *secondaryBatchBuffer,
58+
GraphicsAllocation *dsh,
59+
GraphicsAllocation *reflectionSurface,
60+
GraphicsAllocation *queueStorageBuffer,
61+
GraphicsAllocation *ssh,
62+
GraphicsAllocation *debugQueue) {
63+
64+
threadIDToLocalIDmap.insert(std::make_pair(std::this_thread::get_id(), index));
65+
66+
while (!conditionReady) {
67+
}
68+
69+
Gen10SchedulerSimulation::SchedulerParallel20((IGIL_CommandQueue *)queue->getUnderlyingBuffer(),
70+
(uint *)commandsStack->getUnderlyingBuffer(),
71+
(IGIL_EventPool *)eventsPool->getUnderlyingBuffer(),
72+
(uint *)secondaryBatchBuffer->getUnderlyingBuffer(),
73+
(char *)dsh->getUnderlyingBuffer(),
74+
(IGIL_KernelDataHeader *)reflectionSurface->getUnderlyingBuffer(),
75+
(uint *)queueStorageBuffer->getUnderlyingBuffer(),
76+
(char *)ssh->getUnderlyingBuffer(),
77+
debugQueue != nullptr ? (DebugDataBuffer *)debugQueue->getUnderlyingBuffer() : nullptr);
78+
}
79+
80+
template <>
81+
void SchedulerSimulation<CNLFamily>::patchGpGpuWalker(uint secondLevelBatchOffset,
82+
__global uint *secondaryBatchBuffer,
83+
uint interfaceDescriptorOffset,
84+
uint simdSize,
85+
uint totalLocalWorkSize,
86+
uint3 dimSize,
87+
uint3 startPoint,
88+
uint numberOfHwThreadsPerWg,
89+
uint indirectPayloadSize,
90+
uint ioHoffset) {
91+
Gen10SchedulerSimulation::patchGpGpuWalker(secondLevelBatchOffset,
92+
secondaryBatchBuffer,
93+
interfaceDescriptorOffset,
94+
simdSize,
95+
totalLocalWorkSize,
96+
dimSize,
97+
startPoint,
98+
numberOfHwThreadsPerWg,
99+
indirectPayloadSize,
100+
ioHoffset);
101+
}
102+
103+
template class SchedulerSimulation<CNLFamily>;
104+
105+
} // namespace BuiltinKernelsSimulation

runtime/dll/linux/devices/devices_base.m

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,31 @@
2121
*/
2222

2323
// clang-format off
24+
#ifdef SUPPORT_GEN10
25+
DEVICE( ICNL_5x8_DESK_DEVICE_F0_ID, CNL_2x5x8, GTTYPE_GT2 )
26+
DEVICE( ICNL_5x8_DESKTOP_DEVICE_F0_ID, CNL_2x5x8, GTTYPE_GT2 )
27+
DEVICE( ICNL_5x8_HALO_DEVICE_F0_ID, CNL_2x5x8, GTTYPE_GT2 )
28+
DEVICE( ICNL_5x8_SUPERSKU_DEVICE_F0_ID, CNL_2x5x8, GTTYPE_GT2 )
29+
DEVICE( ICNL_5x8_ULX_DEVICE_F0_ID, CNL_2x5x8, GTTYPE_GT2 )
30+
DEVICE( ICNL_5x8_ULT_DEVICE_F0_ID, CNL_2x5x8, GTTYPE_GT2 )
31+
DEVICE( ICNL_4x8_ULT_DEVICE_F0_ID, CNL_2x4x8, GTTYPE_GT2 )
32+
DEVICE( ICNL_4x8_ULX_DEVICE_F0_ID, CNL_2x4x8, GTTYPE_GT2 )
33+
DEVICE( ICNL_4x8_HALO_DEVICE_F0_ID, CNL_2x4x8, GTTYPE_GT2 )
34+
35+
DEVICE( ICNL_3x8_DESK_DEVICE_F0_ID, CNL_1x3x8, GTTYPE_GT1 )
36+
DEVICE( ICNL_3x8_ULT_DEVICE_F0_ID, CNL_1x3x8, GTTYPE_GT1 )
37+
DEVICE( ICNL_2x8_ULT_DEVICE_F0_ID , CNL_1x2x8, GTTYPE_GT1 )
38+
DEVICE( ICNL_3x8_HALO_DEVICE_F0_ID, CNL_1x3x8, GTTYPE_GT1 )
39+
DEVICE( ICNL_3x8_DESKTOP_DEVICE_F0_ID, CNL_1x3x8, GTTYPE_GT1 )
40+
DEVICE( ICNL_3x8_ULX_DEVICE_F0_ID, CNL_1x3x8, GTTYPE_GT1 )
41+
DEVICE( ICNL_2x8_ULX_DEVICE_F0_ID, CNL_1x2x8, GTTYPE_GT1 )
42+
DEVICE( ICNL_2x8_HALO_DEVICE_F0_ID, CNL_1x2x8, GTTYPE_GT1 )
43+
44+
DEVICE( ICNL_9x8_DESK_DEVICE_F0_ID, CNL_4x9x8, GTTYPE_GT3 )
45+
DEVICE( ICNL_9x8_ULT_DEVICE_F0_ID, CNL_4x9x8, GTTYPE_GT3 )
46+
DEVICE( ICNL_9x8_SUPERSKU_DEVICE_F0_ID, CNL_4x9x8, GTTYPE_GT3 )
47+
#endif
48+
2449
#ifdef SUPPORT_GEN9
2550
#ifdef SUPPORT_SKL
2651
// GT1
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*
2+
* Copyright (c) 2017 - 2018, Intel Corporation
3+
*
4+
* Permission is hereby granted, free of charge, to any person obtaining a
5+
* copy of this software and associated documentation files (the "Software"),
6+
* to deal in the Software without restriction, including without limitation
7+
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
8+
* and/or sell copies of the Software, and to permit persons to whom the
9+
* Software is furnished to do so, subject to the following conditions:
10+
*
11+
* The above copyright notice and this permission notice shall be included
12+
* in all copies or substantial portions of the Software.
13+
*
14+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17+
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
18+
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19+
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20+
* OTHER DEALINGS IN THE SOFTWARE.
21+
*/
22+
23+
#include "runtime/command_stream/aub_command_stream_receiver_hw.h"
24+
#include "runtime/command_stream/aub_command_stream_receiver_hw.inl"
25+
#include "runtime/helpers/base_object.h"
26+
#include "runtime/helpers/array_count.h"
27+
28+
namespace OCLRT {
29+
30+
typedef CNLFamily Family;
31+
static auto gfxCore = IGFX_GEN10_CORE;
32+
33+
template <>
34+
void populateFactoryTable<AUBCommandStreamReceiverHw<Family>>() {
35+
extern AubCommandStreamReceiverCreateFunc aubCommandStreamReceiverFactory[IGFX_MAX_CORE];
36+
UNRECOVERABLE_IF(!isInRange(gfxCore, aubCommandStreamReceiverFactory));
37+
aubCommandStreamReceiverFactory[gfxCore] = AUBCommandStreamReceiverHw<Family>::create;
38+
}
39+
40+
template class AUBCommandStreamReceiverHw<Family>;
41+
} // namespace OCLRT

runtime/gen10/aub_mapper.h

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/*
2+
* Copyright (c) 2017 - 2018, Intel Corporation
3+
*
4+
* Permission is hereby granted, free of charge, to any person obtaining a
5+
* copy of this software and associated documentation files (the "Software"),
6+
* to deal in the Software without restriction, including without limitation
7+
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
8+
* and/or sell copies of the Software, and to permit persons to whom the
9+
* Software is furnished to do so, subject to the following conditions:
10+
*
11+
* The above copyright notice and this permission notice shall be included
12+
* in all copies or substantial portions of the Software.
13+
*
14+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17+
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
18+
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19+
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20+
* OTHER DEALINGS IN THE SOFTWARE.
21+
*/
22+
23+
#pragma once
24+
#include "runtime/gen_common/aub_mapper_base.h"
25+
26+
namespace OCLRT {
27+
struct CNLFamily;
28+
29+
template <>
30+
struct AUBFamilyMapper<CNLFamily> {
31+
enum { device = AubMemDump::DeviceValues::Cnl };
32+
33+
typedef AubMemDump::Traits<device, GfxAddressBits::value> AubTraits;
34+
35+
static const AubMemDump::LrcaHelper *csTraits[EngineType::NUM_ENGINES];
36+
37+
static const MMIOList globalMMIO;
38+
static const MMIOList *perEngineMMIO[EngineType::NUM_ENGINES];
39+
40+
typedef AubMemDump::AubDump<AubTraits> AUB;
41+
};
42+
} // namespace OCLRT

runtime/gen10/aub_mem_dump_gen10.cpp

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
/*
2+
* Copyright (c) 2017 - 2018, Intel Corporation
3+
*
4+
* Permission is hereby granted, free of charge, to any person obtaining a
5+
* copy of this software and associated documentation files (the "Software"),
6+
* to deal in the Software without restriction, including without limitation
7+
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
8+
* and/or sell copies of the Software, and to permit persons to whom the
9+
* Software is furnished to do so, subject to the following conditions:
10+
*
11+
* The above copyright notice and this permission notice shall be included
12+
* in all copies or substantial portions of the Software.
13+
*
14+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17+
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
18+
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19+
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20+
* OTHER DEALINGS IN THE SOFTWARE.
21+
*/
22+
23+
#include "config.h"
24+
#include "aub_mapper.h"
25+
#include "runtime/aub_mem_dump/aub_mem_dump.inl"
26+
#include "runtime/helpers/completion_stamp.h"
27+
28+
namespace AubMemDump {
29+
30+
enum {
31+
device = DeviceValues::Cnl
32+
};
33+
34+
// Instantiate these common template implementations.
35+
template struct AubDump<Traits<device, 32>>;
36+
template struct AubDump<Traits<device, 48>>;
37+
38+
template struct AubPageTableHelper32<Traits<device, 32>>;
39+
template struct AubPageTableHelper64<Traits<device, 48>>;
40+
} // namespace AubMemDump
41+
42+
namespace OCLRT {
43+
using Family = CNLFamily;
44+
45+
static AubMemDump::LrcaHelperRcs rcs(0x000000);
46+
static AubMemDump::LrcaHelperBcs bcs(0x020000);
47+
static AubMemDump::LrcaHelperVcs vcs(0x010000);
48+
static AubMemDump::LrcaHelperVecs vecs(0x018000);
49+
50+
const AubMemDump::LrcaHelper *AUBFamilyMapper<Family>::csTraits[EngineType::NUM_ENGINES] = {
51+
&rcs,
52+
&bcs,
53+
&vcs,
54+
&vecs};
55+
56+
const MMIOList AUBFamilyMapper<Family>::globalMMIO;
57+
58+
static const MMIOList mmioListRCS = {
59+
MMIOPair(0x000020d8, 0x00020000),
60+
MMIOPair(rcs.mmioBase + 0x229c, 0xffff8280),
61+
MMIOPair(0x0000C800, 0x00000009),
62+
MMIOPair(0x0000C804, 0x00000038),
63+
MMIOPair(0x0000C808, 0x0000003B),
64+
MMIOPair(0x0000C80C, 0x00000039),
65+
MMIOPair(0x0000C810, 0x00000037),
66+
MMIOPair(0x0000C814, 0x00000039),
67+
MMIOPair(0x0000C818, 0x00000037),
68+
MMIOPair(0x0000C81C, 0x0000001B),
69+
MMIOPair(0x0000C820, 0x00060037),
70+
MMIOPair(0x0000C824, 0x00000032),
71+
MMIOPair(0x0000C828, 0x00000033),
72+
MMIOPair(0x0000C82C, 0x0000003B),
73+
MMIOPair(0x0000C8C0, 0x00000037),
74+
};
75+
76+
static const MMIOList mmioListBCS = {
77+
MMIOPair(bcs.mmioBase + 0x229c, 0xffff8280),
78+
};
79+
80+
static const MMIOList mmioListVCS = {
81+
MMIOPair(vcs.mmioBase + 0x229c, 0xffff8280),
82+
};
83+
84+
static const MMIOList mmioListVECS = {
85+
MMIOPair(vecs.mmioBase + 0x229c, 0xffff8280),
86+
};
87+
88+
const MMIOList *AUBFamilyMapper<Family>::perEngineMMIO[EngineType::NUM_ENGINES] = {
89+
&mmioListRCS,
90+
&mmioListBCS,
91+
&mmioListVCS,
92+
&mmioListVECS};
93+
} // namespace OCLRT

0 commit comments

Comments
 (0)