File: RT_Jitter_Interface.h

package info (click to toggle)
intel-graphics-compiler2 2.24.13-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 113,504 kB
  • sloc: cpp: 812,849; lisp: 288,219; ansic: 102,423; python: 4,010; yacc: 2,588; lex: 1,666; pascal: 318; sh: 162; makefile: 38
file content (64 lines) | stat: -rw-r--r-- 2,642 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*========================== begin_copyright_notice ============================

Copyright (C) 2019-2021 Intel Corporation

SPDX-License-Identifier: MIT

============================= end_copyright_notice ===========================*/

#pragma once
#include "JitterDataStruct.h"
#include "VISADefines.h"

/**
    API between CMRT and Jitter:
    JITCompile
    freeBlock
    getJITVersion
*/

/**
 *
 *  JIT compile a kernel
 *  kernelName:     name of the kernel, must be < 255 chars.
 *  kernelIsa:      common ISA binary of the kernel supplied by CMRT.
 *  kernelIsaSize:  size of the CISA binary in bytes.
 *  genBinary:      pointer to the Gen binary returned by the jitter.  This is
 *                  allocated by the jitter, and the runtime should free it when
 *                  it's done by calling the freeBlock() function.
 *  genBinarySize:  size in bytes of the Gen binary returned by the jitter.
 *  platform:       platform for the Gen binary.  Currently supported values are
 *                  "BDW", "CHV", "SKL", "BXT", "CNL".
 *  majorVersion:   major version of the CISA binary.  Each jitter
 *                  should declare the highest version of CISA it supports,
 *                  and it should support any CISA file below that version
 *  minorVersion:   minor version of the CISA binary
 *  numArgs:        number of arguments for this JIT compilation.
 *  args:           list of arguments to the Jitter.  The complete list of
 * options can be found in Option.cpp errorMsg:       If JIT compiling fails,
 * the error message will be returned via this parameter.  This buffer is
 * allocated by the runtime. jitInfo:        A structure containing auxiliary
 * information about the JIT compilation that the jitter can pass back to the
 * runtime.
 */
DLL_EXPORT int JITCompile(const char *kernelName, const void *kernelIsa,
                          unsigned int kernelIsaSize, void *&genBinary,
                          unsigned int &genBinarySize, const char *platform,
                          int majorVersion, int minorVersion, int numArgs,
                          const char *args[], char *errorMsg,
                          vISA::FINALIZER_INFO *jitInfo);

/**
 *
 *  Interface for CMRT to free the kernel binary allocated by the Jitter
 */
DLL_EXPORT void freeBlock(void *ptr);

/**
 *
 *  Returns the CISA version #(<major_version>.<minor_version>) for this jitter.
 *  a jitter will support all vISA objects whose major version is the same as
 * the jiter and whose minor version is <= jitter's minor version.
 *
 */
DLL_EXPORT void getJITVersion(unsigned int &majorV, unsigned int &minorV);