CorTeX Core ABI 7
ToolTech Software · C++ library reference
Loading...
Searching...
No Matches
ctxVirtualMachine.h
Go to the documentation of this file.
1//*****************************************************************************
2// File : ctxVirtualMachine.h
3// Description : Execution of the neural network
4// Author : Anders Modén
5// Product : CorTeX 2.0.1
6//
7// Copyright © 2015- Anders Modén, Sweden
8//
9// NOTE: CorTeX is a software development kit (SDK)
10// for neural networks and genetic programming.
11// Licensed by Anders Modén.
12//
13//
14// Revision History...
15//
16// Who Date Description
17//
18// AMO 261114 Expose checked original register lookup on the existing placement (2.0.2)
19// AMO 261114 Add compact common dependency-pass preparation (2.0.2)
20// AMO 261012 Add opt-in dense cross-program mask layout (2.0.2)
21// AMO 261012 Carry original mask positions through execution-slot packing (2.0.2)
22// AMO 261012 Share parallel CAL instruction-origin mapping (2.0.2)
23// AMO 261011 Added opt-in shared-parameter gradient policy (2.0.2)
24// AMO 150708 Created file (1.0.0)
25//
26//******************************************************************************
27#ifndef __CTX_VIRTUAL_MACHINE_H__
28#define __CTX_VIRTUAL_MACHINE_H__
29
30#include "ctxBase.h"
31#include "ctxInlineFuncs.h"
32
33// ------------------- Optimization flags -------------------------
34
36{
38 CTX_OPTIMIZE_VALUE_USE = 1 << 0, // Evaluate-optimering
40 CTX_OPTIMIZE_TRAIN_SAFE = 1 << 2, // Latta optimeringar som bevarar traningskontraktet
41 CTX_OPTIMIZE_SHARED_PARAMETER_GRADIENTS = 1 << 3, // With TRAIN_SAFE: sum tied gradients before optimizer update
44};
45
47
56
58
60{
62 CTX_REDUCE_STRIP_DROPCONNECT = (1u << 0), // Ta bort TEST/ZERO_DROP_VALUE
63 CTX_REDUCE_PRESERVE_BACKPROP_BANKS = (1u << 1), // Bevara DELTA/DELTA_SUM från DSE
64 CTX_REDUCE_MAD_REORDER = (1u << 2), // Omordna SoP → längre MAD-kluster
65 CTX_REDUCE_SPLIT_VALUE_STORESOURCE = (1u<<3) // Split or coalese
66
67};
68
70
71
72
73// ----------------------------------- ctxVirtualMachineProgram -------------------
74
75class ctxVirtualMachineProgram : public gzReference
76{
77public:
78
80
82
83 // ------ public attributes ------------
84
85 gzUInt32 id;
86
87 gzUInt32 *commands;
88 gzUInt32 command_len;
89
90 gzFloat *parameters; // All registers ae shared memory
92
93 gzFloat *input;
94 gzUInt32 *input_updateID;
95
96 gzFloat *values;
97 gzUInt32 *value_updateID;
98
99 gzFloat *deltaValues;
101
104
107
110
113
116
119
122
125
128
129 gzFloat *stack; // must be set with (gzFloat *)gz_malloc_aligned(sizeof(gzFloat)*program->stack_size, 16);
130 gzUInt32 stack_size;
131
132 gzUInt32 start_page;
133 gzUInt32 end_page;
134
135 // -- Backend Compiler Accelleration ----------------------------
136
138
139 gzString errorInformation; // Will be set if compilation failed
140
141 gzRefPointer<gzReference> nativeProgram;
142
143};
144
145GZ_DECLARE_REFPTR(ctxVirtualMachineProgram);
146
148
150
151
152// --------------- Utilities for command buffers ----------------------------
153
168
169class ctxRegisterAccessDependacy : public gzReference
170{
171public:
172
173 ctxRegisterAccessDependacy(gzUInt32 reader_, gzUInt32 writer_) :reader(reader_), writer(writer_) {}
174
175 gzUInt32 reader;
176 gzUInt32 writer;
177};
178
179
181{
182public:
183
185
186 gzUInt32 writer;
187};
188
205
207{
208 gzUInt32 start_index;
209 gzUInt32 length;
210};
211
213{
214public:
215
216 ctxExecutionCostModel(gzUInt32 parallel_capacity = 1,
217 gzDouble instruction_cost = 1.0,
218 gzDouble program_launch_cost = 0.0,
219 gzDouble pass_barrier_cost = 0.0)
220 : parallelCapacity(parallel_capacity),
221 instructionCost(instruction_cost),
222 programLaunchCost(program_launch_cost),
223 passBarrierCost(pass_barrier_cost)
224 {
225 }
226
231};
232
234{
235public:
236
238 {
239 paramRegister = FALSE;
240 valueRegister = FALSE;
241 deltaRegister = FALSE;
242 wbRegister = FALSE;
243 deltaSumRegister = FALSE;
244 deltaRMSRegister = FALSE;
245 dropConnections = FALSE;
246 generalRegister = FALSE;
247 tempRegisters = FALSE;
248 expectedRegister = FALSE;
249 inputRegister = FALSE;
250 gradient = FALSE;
251 }
252
264
265 gzBool gradient;
266
267};
268
318
320{
321public:
322
324 {
325 totalMs = 0.0;
326 prescanMs = 0.0;
327 backwardMs = 0.0;
328 emitMs = 0.0;
329 emitTempSoPMs = 0.0;
330 emitPerfectMadMs = 0.0;
331 emitMixedSoPMs = 0.0;
332 emitCopyMs = 0.0;
333 postRewriteMs = 0.0;
334 rewriteDetectMs = 0.0;
335 rewriteCopyMs = 0.0;
336 cleanupMs = 0.0;
337 registerUsageMs = 0.0;
338 emitTempSoPHits = 0;
341 rewriteHits = 0;
342 }
343
344 gzDouble totalMs;
345 gzDouble prescanMs;
346 gzDouble backwardMs;
347 gzDouble emitMs;
351 gzDouble emitCopyMs;
355 gzDouble cleanupMs;
360 gzUInt32 rewriteHits;
361};
362
389
391{
392public:
393
394 ctxDetailedRegisterUse(gzUInt32 chunkSize=1000)
395 {
396 reset(chunkSize);
397 }
398
399 gzVoid reset(gzUInt32 chunkSize)
400 {
401 paramRegister.setChunkSize(chunkSize);
402 paramRegister.setSize(0);
403
404 valueRegister.setChunkSize(chunkSize);
405 valueRegister.setSize(0);
406
407 deltaRegister.setChunkSize(chunkSize);
408 deltaRegister.setSize(0);
409
410 wbRegister.setChunkSize(chunkSize);
411 wbRegister.setSize(0);
412
413 deltaSumRegister.setChunkSize(chunkSize);
414 deltaSumRegister.setSize(0);
415
416 dropConnections.setChunkSize(chunkSize);
417 dropConnections.setSize(0);
418
419 generalRegister.setChunkSize(chunkSize);
420 generalRegister.setSize(0);
421
422 tempRegisters.setChunkSize(chunkSize);
423 tempRegisters.setSize(0);
424
425 expectedRegister.setChunkSize(chunkSize);
426 expectedRegister.setSize(0);
427
428 inputRegister.setChunkSize(chunkSize);
429 inputRegister.setSize(0);
430 }
431
432 gzDynamicArray<ctxRegisterUse> paramRegister;
433 gzDynamicArray<ctxRegisterUse> valueRegister;
434 gzDynamicArray<ctxRegisterUse> deltaRegister;
435 gzDynamicArray<ctxRegisterUse> wbRegister;
436 gzDynamicArray<ctxRegisterUse> deltaSumRegister;
437 gzDynamicArray<ctxRegisterUse> dropConnections;
438 gzDynamicArray<ctxRegisterUse> generalRegister;
439 gzDynamicArray<ctxRegisterUse> tempRegisters;
440 gzDynamicArray<ctxRegisterUse> expectedRegister;
441 gzDynamicArray<ctxRegisterUse> inputRegister;
442
443};
444
446{
447public:
448
454 CTX_EXPORT gzBool mapIndex(ctxRegistrySourceIndex bank, gzUInt32 sourceIndex,
455 gzUInt32& mappedIndex) const;
456
457 gzArray<gzUInt32> paramRegister;
459
460 gzArray<gzUInt32> valueRegister;
462
463 gzArray<gzUInt32> deltaRegister;
465
466 gzArray<gzUInt32> wbRegister;
468
469 gzArray<gzUInt32> deltaSumRegister;
471
472 gzArray<gzUInt32> dropConnections;
474
475 gzArray<gzUInt32> generalRegister;
477
478 gzArray<gzUInt32> tempRegisters;
480
481 gzArray<gzUInt32> expectedRegister;
483
484 gzArray<gzUInt32> inputRegister;
486
487};
488
489// ----------------------- ctxProgramExecution ----------------------------
502
504
505// ----------------------------------- ctxVirtualMachine ----------------------------
506
508{
509public:
510
512
517 CTX_EXPORT static gzBool optimize(ctxVirtualMachineProgram *program, ctxDetailedRegisterUse & detailUse,ctxOptimizeFlags flags, const gzDynamicArray<gzUInt32>* valueKeepList = nullptr, ctxRegisterTranslation *translationOut = nullptr);
518
520
521};
522
523// ---------------------------------- Utilities ------------------------------------
524
525CTX_EXPORT ctxCommandBufferSubRoutine ctxGetCommandBufferInfo(const gzUInt32 *commands,gzUInt32 command_len,gzUInt32 start_index=0);
526
527CTX_EXPORT gzArray<ctxCommandBufferSubRoutine> ctxParallelCommandBufferSubRoutine(gzUInt32 *commands,gzUInt32 *destinationParallelCommands,ctxCommandBufferSubRoutine subroutine,gzBool combineSmallPackages=FALSE);
528
529CTX_EXPORT gzBool ctxUpdateCommandBufferDependancies(gzUInt32 *commands,gzArray<ctxCommandBufferSubRoutine> &subroutines,ctxRegisterUseInfo *updates=NULL);
530
532
536CTX_EXPORT gzBool ctxBuildCommandBufferPasses(gzUInt32* commands,
537 gzArray<ctxCommandBufferSubRoutine>& subroutines, ctxRegisterUseInfo* updates = NULL);
538
539CTX_EXPORT gzBool ctxGetProgramRegisterAccessInfo(gzUInt32 *commands,gzArray<ctxCommandBufferSubRoutine> &subroutines, gzArray<ctxProgramRegisterAccessInfo> &access, gzRefList<ctxRegisterAccessDependacy> &depends, ctxRegisterUseInfo *updates=NULL);
540
541CTX_EXPORT gzUInt32 ctxBuildParallelExecutionInfo(gzArray<ctxParallelExecution> &executionInfo,gzArray<ctxParallelExecution> &executionData,gzArray<ctxCommandBufferSubRoutine> &subroutines);
542CTX_EXPORT gzDouble ctxGetParallelProgramExecCost(const gzUInt32 *commands,const ctxParallelExecution &execution,const ctxExecutionCostModel &costModel);
543CTX_EXPORT gzDouble ctxGetParallelPassExecCost(const gzUInt32 *commands,const ctxParallelExecution &passInfo,const gzArray<ctxParallelExecution> &executionData,const ctxExecutionCostModel &costModel);
544CTX_EXPORT gzDouble ctxGetParallelPlanExecCost(const gzUInt32 *commands,const gzArray<ctxParallelExecution> &executionInfo,const gzArray<ctxParallelExecution> &executionData,const ctxExecutionCostModel &costModel);
545
546CTX_EXPORT gzUInt32 ctxHasRecallValues(gzUInt32 *commands,gzUInt32 search_index);
547
553 const gzArray<gzUInt32>& parallelCommands, const gzArray<ctxCommandBufferSubRoutine>& routines,
554 gzArray<gzUInt32>& origins, gzBool& preserveDropCommands);
555
556CTX_EXPORT gzUInt32 ctxGetSubRoutineLength(gzArray<ctxCommandBufferSubRoutine>& subroutines);
557
558CTX_EXPORT gzUInt32 ctxGetProgramMaxRegisterSize(gzUInt32 *commands, gzArray<ctxCommandBufferSubRoutine> &subroutines);
559
560CTX_EXPORT gzVoid ctxRebuildSubroutines(gzArray<ctxParallelExecution> &executionInfo, gzArray<ctxParallelExecution> &executionData, gzArray<ctxCommandBufferSubRoutine> &result);
561
562CTX_EXPORT gzUInt32 ctxCopyCommandBuffer(gzUInt32 *destination,gzUInt32 *source,gzUInt32 length,gzBool addSkipCommand=FALSE,gzUInt32 *instructions=nullptr);
563
564CTX_EXPORT ctxRegisterUseInfo ctxGetRegisterUsage(gzUInt32 *commands, gzUInt32 length, ctxDetailedRegisterUse *detail=NULL, gzUInt32 pass=0, gzUInt32 program=0);
565
566CTX_EXPORT gzArray<ctxRegisterUseInfo> ctxGetRegisterUsage(gzUInt32 program,gzArray<ctxParallelExecution> &executionInfo, gzArray<ctxParallelExecution> &executionData, gzUInt32 *source, ctxDetailedRegisterUse *detail = NULL);
567
568
569
570
571
572
573
574
575CTX_EXPORT gzUInt32 ctxCombineParallelExecutionInfo(gzUInt32 *commands,gzUInt32 length,gzArray<ctxParallelExecution> &executionInfo,gzArray<ctxParallelExecution> &executionData,gzUInt32 targetThreads);
576
578CTX_EXPORT gzUInt32 ctxCombineParallelExecutionInfo(gzUInt32* commands, gzUInt32 length,
579 gzArray<ctxParallelExecution>& executionInfo, gzArray<ctxParallelExecution>& executionData,
580 gzUInt32 targetThreads, gzArray<gzUInt32>* commandOrigins);
581
582//CTX_EXPORT gzUInt32 ctxUnifyParallelPasses(gzArray<gzUInt32> &commands, gzArray<ctxParallelExecution> &executionInfo, gzArray<ctxParallelExecution> &executionData);
583
584
585
586CTX_EXPORT gzArray<gzUInt32> ctxOptimizeRegisterUsage(gzDynamicArray<ctxRegisterUse> &register_use,gzBool sequential=FALSE,gzUInt32 *max_register_index=NULL);
587
588CTX_EXPORT gzUInt32 ctxGetOptimizeLocalRegisterReductions(gzDynamicArray<ctxRegisterUse> &register_use, gzUInt32 *source, gzUInt32 command, gzUInt32 anti_command);
589
590CTX_EXPORT gzUInt32 ctxCopyReducedBuffer(const gzUInt32* source, gzUInt32 length,gzDynamicArray<gzUInt32>& destination, ctxDetailedRegisterUse& detailUse, gzUInt32 pass=0, gzUInt32 program=0, ctxReduceFlags reduceFlags = CTX_REDUCE_PRESERVE_BACKPROP_BANKS,const gzDynamicArray<gzUInt32>* valueKeepList = nullptr, ctxReduceProfile* profile = nullptr);
591
592CTX_EXPORT gzUInt32 ctxGetStackSize(gzUInt32 *commands, gzUInt32 length);
593
595
596// Sammanfattar reduceringens effekt sa att tester kan mata storlek, handoff-trafik och pass.
597CTX_EXPORT ctxOptimizerStats ctxGetOptimizerStats(const gzUInt32* source, gzUInt32 length, ctxReduceFlags reduceFlags = CTX_REDUCE_PRESERVE_BACKPROP_BANKS, const gzDynamicArray<gzUInt32>* valueKeepList = nullptr, gzBool includeParallelStats = TRUE);
598
604CTX_EXPORT gzBool ctxTranslateRegisterUsage(ctxDetailedRegisterUse &detailUse,ctxRegisterTranslation &translation, gzUInt32 *source, gzUInt32 length);
605
606
607#endif //__CTX_VIRTUAL_MACHINE_H__
608
gzDynamicArray< ctxRegisterUse > paramRegister
gzDynamicArray< ctxRegisterUse > generalRegister
gzDynamicArray< ctxRegisterUse > inputRegister
gzDynamicArray< ctxRegisterUse > dropConnections
gzDynamicArray< ctxRegisterUse > valueRegister
gzDynamicArray< ctxRegisterUse > deltaSumRegister
gzDynamicArray< ctxRegisterUse > deltaRegister
gzDynamicArray< ctxRegisterUse > tempRegisters
gzDynamicArray< ctxRegisterUse > expectedRegister
gzVoid reset(gzUInt32 chunkSize)
ctxDetailedRegisterUse(gzUInt32 chunkSize=1000)
gzDynamicArray< ctxRegisterUse > wbRegister
ctxExecutionCostModel(gzUInt32 parallel_capacity=1, gzDouble instruction_cost=1.0, gzDouble program_launch_cost=0.0, gzDouble pass_barrier_cost=0.0)
ctxRegisterWriter latencyValueRegister
ctxRegisterWriter parameterUpdateRegister
ctxRegisterAccessDependacy(gzUInt32 reader_, gzUInt32 writer_)
gzArray< gzUInt32 > paramRegister
gzArray< gzUInt32 > valueRegister
gzArray< gzUInt32 > tempRegisters
gzArray< gzUInt32 > wbRegister
gzArray< gzUInt32 > inputRegister
gzArray< gzUInt32 > dropConnections
gzArray< gzUInt32 > deltaRegister
gzBool mapIndex(ctxRegistrySourceIndex bank, gzUInt32 sourceIndex, gzUInt32 &mappedIndex) const
Resolve an original register index through this optimizer placement.
gzArray< gzUInt32 > deltaSumRegister
gzArray< gzUInt32 > generalRegister
gzArray< gzUInt32 > expectedRegister
static gzBool optimize(ctxVirtualMachineProgram *program, ctxDetailedRegisterUse &detailUse, ctxOptimizeFlags flags, const gzDynamicArray< gzUInt32 > *valueKeepList=nullptr, ctxRegisterTranslation *translationOut=nullptr)
Reduce transports and place registers before emitting evaluate MAD groups.
static gzBool execute(ctxVirtualMachineProgram *program, const ctxProgramExecution &flags=CTX_PRG_EXEC_DEFAULT, ctxDetailedRegisterUse *register_use=NULL)
static gzBool checkConsistency(ctxVirtualMachineProgram *program)
ctxCompileStatus compile_status
gzRefPointer< gzReference > nativeProgram
virtual ~ctxVirtualMachineProgram()
#define CTX_EXPORT
Definition ctxBase.h:68
ctxRegistrySourceIndex
GZ_USE_BIT_LOGIC(ctxInstrumentationFlags)
const gzUInt32 CTX_UNDEFINED_INDEX
Definition ctxTypes.h:35
gzBool ctxGetProgramRegisterAccessInfo(gzUInt32 *commands, gzArray< ctxCommandBufferSubRoutine > &subroutines, gzArray< ctxProgramRegisterAccessInfo > &access, gzRefList< ctxRegisterAccessDependacy > &depends, ctxRegisterUseInfo *updates=NULL)
ctxProgramExecution
Execution flags for ctxVirtualMachine::execute.
@ CTX_PRG_EXEC_DEFAULT
Ignore register dependancies.
@ CTX_PRG_EXEC_SINGLE
@ CTX_PRG_EXEC_EXECUTE_ON_WM
Only compile the program don't execute.
@ CTX_PRG_EXEC_NO_REG_DEPS
Execute pages in reversed order (for backprop).
@ CTX_PRG_EXEC_PARALLEL
Execute using built in WM and ignore compile backed.
@ CTX_PRG_EXEC_COMPILE_ONLY
@ CTX_PRG_EXEC_REVERSED_PAGES
Execute in parallel if possible.
gzUInt32 ctxGetOptimizeLocalRegisterReductions(gzDynamicArray< ctxRegisterUse > &register_use, gzUInt32 *source, gzUInt32 command, gzUInt32 anti_command)
gzArray< gzUInt32 > ctxOptimizeRegisterUsage(gzDynamicArray< ctxRegisterUse > &register_use, gzBool sequential=FALSE, gzUInt32 *max_register_index=NULL)
gzUInt32 ctxCopyReducedBuffer(const gzUInt32 *source, gzUInt32 length, gzDynamicArray< gzUInt32 > &destination, ctxDetailedRegisterUse &detailUse, gzUInt32 pass=0, gzUInt32 program=0, ctxReduceFlags reduceFlags=CTX_REDUCE_PRESERVE_BACKPROP_BANKS, const gzDynamicArray< gzUInt32 > *valueKeepList=nullptr, ctxReduceProfile *profile=nullptr)
ctxOptimizerStats ctxGetOptimizerStats(const gzUInt32 *source, gzUInt32 length, ctxReduceFlags reduceFlags=CTX_REDUCE_PRESERVE_BACKPROP_BANKS, const gzDynamicArray< gzUInt32 > *valueKeepList=nullptr, gzBool includeParallelStats=TRUE)
ctxReduceFlags
@ CTX_REDUCE_DEFAULT
@ CTX_REDUCE_SPLIT_VALUE_STORESOURCE
@ CTX_REDUCE_STRIP_DROPCONNECT
@ CTX_REDUCE_MAD_REORDER
@ CTX_REDUCE_PRESERVE_BACKPROP_BANKS
gzBool(*) ctxVirtualMachineProgramFunc(ctxVirtualMachineProgram *program)
gzUInt32 ctxGetStackSize(gzUInt32 *commands, gzUInt32 length)
ctxRegisterUseInfo ctxGetRegisterUsage(gzUInt32 *commands, gzUInt32 length, ctxDetailedRegisterUse *detail=NULL, gzUInt32 pass=0, gzUInt32 program=0)
ctxCompileStatus
@ CTX_COMPILE_STATUS_OPTIMIZED
@ CTX_COMPILE_STATUS_DISPOSE_COMMANDS
@ CTX_COMPILE_STATUS_NOT_COMPILED
@ CTX_COMPILE_STATUS_ERROR_IN_COMPILE
@ CTX_COMPILE_STATUS_COMPILED
gzBool ctxTranslateRegisterUsage(ctxDetailedRegisterUse &detailUse, ctxRegisterTranslation &translation, gzUInt32 *source, gzUInt32 length)
Translate scalar operands and complete representable ranged sequences.
gzUInt32 ctxCopyCommandBuffer(gzUInt32 *destination, gzUInt32 *source, gzUInt32 length, gzBool addSkipCommand=FALSE, gzUInt32 *instructions=nullptr)
gzVoid ctxRebuildSubroutines(gzArray< ctxParallelExecution > &executionInfo, gzArray< ctxParallelExecution > &executionData, gzArray< ctxCommandBufferSubRoutine > &result)
gzDouble ctxGetParallelPlanExecCost(const gzUInt32 *commands, const gzArray< ctxParallelExecution > &executionInfo, const gzArray< ctxParallelExecution > &executionData, const ctxExecutionCostModel &costModel)
gzBool ctxBuildCommandBufferPasses(gzUInt32 *commands, gzArray< ctxCommandBufferSubRoutine > &subroutines, ctxRegisterUseInfo *updates=NULL)
Build the same hazard-safe passes without retaining diagnostic dependency lists.
gzDouble ctxGetParallelPassExecCost(const gzUInt32 *commands, const ctxParallelExecution &passInfo, const gzArray< ctxParallelExecution > &executionData, const ctxExecutionCostModel &costModel)
gzArray< ctxCommandBufferSubRoutine > ctxParallelCommandBufferSubRoutine(gzUInt32 *commands, gzUInt32 *destinationParallelCommands, ctxCommandBufferSubRoutine subroutine, gzBool combineSmallPackages=FALSE)
gzBool ctxUpdateCommandBufferDependancies(gzUInt32 *commands, gzArray< ctxCommandBufferSubRoutine > &subroutines, ctxRegisterUseInfo *updates=NULL)
gzUInt32 ctxGetSubRoutineLength(gzArray< ctxCommandBufferSubRoutine > &subroutines)
gzUInt32 ctxBuildParallelExecutionInfo(gzArray< ctxParallelExecution > &executionInfo, gzArray< ctxParallelExecution > &executionData, gzArray< ctxCommandBufferSubRoutine > &subroutines)
ctxOptimizeFlags
@ CTX_OPTIMIZE_VALUE_USE
@ CTX_OPTIMIZE_NONE
@ CTX_OPTIMIZE_TRAIN_SAFE
@ CTX_OPTIMIZE_COMPACT_DROP_MASKS
Compact used mask indices without reusing a mask across forward/backward lifetime.
@ CTX_OPTIMIZE_REMOVE_DROP_TEST
@ CTX_OPTIMIZE_SHARED_PARAMETER_GRADIENTS
ctxCommandBufferSubRoutine ctxGetCommandBufferInfo(const gzUInt32 *commands, gzUInt32 command_len, gzUInt32 start_index=0)
gzBool ctxBuildParallelCommandOrigins(const ctxVirtualMachineProgram *program, const gzArray< gzUInt32 > &parallelCommands, const gzArray< ctxCommandBufferSubRoutine > &routines, gzArray< gzUInt32 > &origins, gzBool &preserveDropCommands)
Preserve original CAL word positions after backend partitioning.
gzUInt32 ctxCombineParallelExecutionInfo(gzUInt32 *commands, gzUInt32 length, gzArray< ctxParallelExecution > &executionInfo, gzArray< ctxParallelExecution > &executionData, gzUInt32 targetThreads)
gzDouble ctxGetParallelProgramExecCost(const gzUInt32 *commands, const ctxParallelExecution &execution, const ctxExecutionCostModel &costModel)
gzUInt32 ctxGetProgramMaxRegisterSize(gzUInt32 *commands, gzArray< ctxCommandBufferSubRoutine > &subroutines)
gzUInt32 ctxHasRecallValues(gzUInt32 *commands, gzUInt32 search_index)
ctxVirtualMachineProgramFunc * func