File: DriverInfoOCL.hpp

package info (click to toggle)
intel-graphics-compiler2 2.16.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 106,644 kB
  • sloc: cpp: 805,640; lisp: 287,672; ansic: 16,414; python: 3,952; yacc: 2,588; lex: 1,666; pascal: 313; sh: 186; makefile: 35
file content (82 lines) | stat: -rw-r--r-- 3,041 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
/*========================== begin_copyright_notice ============================

Copyright (C) 2018-2021 Intel Corporation

SPDX-License-Identifier: MIT

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

#pragma once

#include "Compiler/CISACodeGen/DriverInfo.hpp"

namespace TC {
/// caps common to all OCL runtimes
class CDriverInfoOCLCommon : public IGC::CDriverInfo {
public:
  bool AllowUnsafeHalf() const override { return false; }

  bool AllowSendFusion() const override { return false; }

  bool SupportFastestStage1() const override { return true; }

  bool SupportsIEEEMinMax() const override { return true; }

  bool NeedCheckContractionAllowed() const override { return true; }

  bool NeedI64BitDivRem() const override { return true; }

  bool HasMemoryIntrinsics() const override { return true; }

  bool HasNonNativeLoadStore() const override { return true; }

  bool NeedLoweringInlinedConstants() const override { return true; }
  bool benefitFromTypeDemotion() const override { return true; }
  bool benefitFromPreRARematFlag() const override { return true; }

  bool NeedExtraPassesAfterAlwaysInlinerPass() const override { return true; }
  bool enableVISAPreRAScheduler() const override { return true; }
  bool enableVISAPreRASchedulerForRetry() const override { return true; }

  bool NeedWAToTransformA32MessagesToA64() const override { return true; }
  bool WADisableCustomPass() const override { return false; }
  bool WAEnableMemOpt2ForOCL() const override { return true; }

  unsigned int GetLoopUnrollThreshold() const override { return 1280; }
  bool Enable64BitEmu() const override { return true; }

  bool NeedIEEESPDiv() const override { return true; }

  // Not needed as OCL doesn't go through emitStore3DInner
  bool splitUnalignedVectors() const override { return false; }

  bool supportsStatelessSpacePrivateMemory() const override { return true; }

  bool NeedFP64(PRODUCT_FAMILY productFamily) const override { return IGC_IS_FLAG_ENABLED(EnableDPEmulation); }

  bool NeedFP64DivSqrt() const override { return true; }

  bool NeedFP64toFP16Conv() const override { return true; }

  bool EnableIntegerMad() const override { return true; }

  bool RespectPerInstructionContractFlag() const override { return true; }

  bool EnableLSCForLdRawAndStoreRawOnDG2() const override { return true; }

  bool supportLscSamplerRouting() const override { return false; }
};

// In case some cpas are specific to NEO
class CDriverInfoOCLNEO : public CDriverInfoOCLCommon {
public:
  bool SupportsStatelessToStatefulBufferTransformation() const override { return true; }
  unsigned getVISAPreRASchedulerCtrl() const override { return 6; }
  bool SupportStatefulToken() const override { return true; }
  bool SupportInlineAssembly() const override { return true; }
  /// Enables the use of inline data on XeHP_SDV+
  virtual bool UseInlineData() const override { return true; }
  bool getLscStoresWithNonDefaultL1CacheControls() const override { return false; }
};

} // namespace TC