File: VISAAttributes.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 (88 lines) | stat: -rw-r--r-- 4,226 bytes parent folder | download
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/*========================== begin_copyright_notice ============================

Copyright (C) 2020-2021 Intel Corporation

SPDX-License-Identifier: MIT

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

///
/// Generic form:
///    DEF_ATTR(Enum, Name, Kind, Default, Desc)
///
/// Specific form:
/// DEF_ATTR_BOOL(Enum, Name, Kind, Default, Desc)
/// DEF_ATTR_INT32(Enum, Name, Kind, Default, Desc)
/// DEF_ATTR_INT64(Enum, Name, Kind, Default, Desc)
/// DEF_ATTR_CSTR(Enum, Name, Kind, Default, Desc)
///

#ifdef DEF_ATTR
#define DEF_ATTR_BOOL(E, N, K, Default, D) DEF_ATTR(E, N, K, Default, D)
#define DEF_ATTR_INT32(E, N, K, Default, D) DEF_ATTR(E, N, K, Default, D)
#define DEF_ATTR_INT64(E, N, K, Default, D) DEF_ATTR(E, N, K, Default, D)
#define DEF_ATTR_CSTR(E, N, K, Default, D) DEF_ATTR(E, N, K, Default, D)
#endif

// bool attributes
DEF_ATTR_BOOL(ATTR_Extern, "Extern", AK_KERNEL, false,
              "True for extern function")
DEF_ATTR_BOOL(ATTR_NoBarrier, "NoBarrier", AK_KERNEL, false,
              "True if kernel has no barrier")
DEF_ATTR_BOOL(ATTR_Callable, "Callable", AK_KERNEL, false, "")
DEF_ATTR_BOOL(ATTR_Caller, "Caller", AK_KERNEL, false, "")
DEF_ATTR_BOOL(ATTR_Composable, "Composable", AK_KERNEL, false, "")
DEF_ATTR_BOOL(ATTR_Entry, "Entry", AK_KERNEL, false, "")
DEF_ATTR_BOOL(ATTR_Input, "Input", AK_VAR, false, "True if var is input var")
DEF_ATTR_BOOL(ATTR_Output, "Output", AK_VAR, false, "True if var is output var")
DEF_ATTR_BOOL(ATTR_PayloadLiveOut, "PayloadLiveOut", AK_VAR, false,
              "True if var is payload liveout var")
DEF_ATTR_BOOL(ATTR_Input_Output, "Input_Output", AK_VAR, false,
              "True if var is both input and output var")
DEF_ATTR_BOOL(ATTR_NoWidening, "NoWidening", AK_VAR, false, "")
DEF_ATTR_BOOL(ATTR_DoNotSpill, "DoNotSpill", AK_VAR, false,
              "True if var should not be spilled")
DEF_ATTR_BOOL(ATTR_ForceSpill, "ForceSpill", AK_VAR, false,
              "True if var is forced to be spilled")
DEF_ATTR_BOOL(ATTR_SepSpillPvtSS, "SepSpillPvtSS", AK_KERNEL, false, "")
DEF_ATTR_BOOL(ATTR_LTOInvokeOptTarget, "LTO_InvokeOptTarget", AK_KERNEL, 0, "")
DEF_ATTR_BOOL(ATTR_AllLaneActive, "AllLaneActive", AK_KERNEL, false,
              "True if all lanes are active at the function entry")
DEF_ATTR_BOOL(ATTR_ExclusiveLoad, "ExclusiveLoad", AK_VAR, false,
              "True if var is exclusive load var which is defined by send, but "
              "write to different channel in each load instance")

// int32 attributes
DEF_ATTR_INT32(ATTR_Target, "Target", AK_KERNEL, VISA_CM,
               "Software Platform that generates this kernel (CM, 3D, CS)")
DEF_ATTR_INT32(ATTR_SLMSize, "SLMSize", AK_KERNEL, 0, "SLM size")
DEF_ATTR_INT32(ATTR_SpillMemOffset, "SpillMemOffset", AK_KERNEL, 0,
               "Offset at which location of GRF spill/fill memory starts")
DEF_ATTR_INT32(ATTR_ArgSize, "ArgSize", AK_KERNEL, 0,
               "Argument's size in bytes")
DEF_ATTR_INT32(ATTR_RetValSize, "RetValSize", AK_KERNEL, 0,
               "Return value's size in bytes")
DEF_ATTR_INT32(ATTR_PerThreadInputSize, "PerThreadInputSize", AK_KERNEL, 0,
               "per-thread payload size in bytes")
DEF_ATTR_INT32(ATTR_SimdSize, "SimdSize", AK_KERNEL, 0,
               "Dispatch simd size. 0 if not provided.")
DEF_ATTR_INT32(ATTR_NumGRF, "NumGRF", AK_KERNEL, 0,
               "Number of GRFs for current kernel. If 0, vISA decides best GRF "
               "number (auto GRF selection).")
DEF_ATTR_INT32(ATTR_Scope, "Scope", AK_VAR, 0, "")
DEF_ATTR_INT32(ATTR_SurfaceUsage, "SurfaceUsage", AK_VAR, 0, "")
DEF_ATTR_INT32(ATTR_CrossThreadInputSize, "CrossThreadInputSize", AK_KERNEL, -1,
               "cross-thread payload size in bytes")
DEF_ATTR_INT32(ATTR_NBarrierCnt, "NBarrierCnt", AK_KERNEL, 0, "")
DEF_ATTR_INT32(ATTR_MaxRegThreadDispatch, "MaxRegThreadDispatch", AK_KERNEL,
               0, "Maximum register number used for thread dispatch")

// C String Attributes
DEF_ATTR_CSTR(ATTR_OutputAsmPath, "OutputAsmPath", AK_KERNEL, "",
              "Directory name under which output files go")

#undef DEF_ATTR
#undef DEF_ATTR_BOOL
#undef DEF_ATTR_INT32
#undef DEF_ATTR_INT64
#undef DEF_ATTR_CSTR