Files
compute-runtime/shared/source/helpers/compiler_hw_info_config.h
Daria Hinz 6d365cbfc3 Ocloc: New AOT design implementation
Ocloc will handle any new values that may be
passed to the -device argument.

Supported acronyms are available under cmd:
ocloc compile --help

Supported patterns:
- device acronym
- release acronym
- family acronym
- version (major.minor.revision)

Fatbinary will no longer handle major.minor.revision variances,
only acronyms allowed.

Signed-off-by: Daria Hinz <daria.hinz@intel.com>
2022-06-14 13:20:45 +02:00

65 lines
2.0 KiB
C++

/*
* Copyright (C) 2021-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/source/helpers/hw_info.h"
#include "shared/source/helpers/product_config_helper.h"
#include "igfxfmid.h"
namespace NEO {
class CompilerHwInfoConfig;
struct HardwareInfo;
extern CompilerHwInfoConfig *CompilerHwInfoConfigFactory[IGFX_MAX_PRODUCT];
class CompilerHwInfoConfig {
public:
static CompilerHwInfoConfig *get(PRODUCT_FAMILY product) {
return CompilerHwInfoConfigFactory[product];
}
virtual bool isMidThreadPreemptionSupported(const HardwareInfo &hwInfo) const = 0;
virtual bool isForceEmuInt32DivRemSPRequired() const = 0;
virtual bool isStatelessToStatefulBufferOffsetSupported() const = 0;
virtual bool isForceToStatelessRequired() const = 0;
virtual void adjustHwInfoForIgc(HardwareInfo &hwInfo) const = 0;
virtual void setProductConfigForHwInfo(HardwareInfo &hwInfo, AheadOfTimeConfig config) const = 0;
};
template <PRODUCT_FAMILY gfxProduct>
class CompilerHwInfoConfigHw : public CompilerHwInfoConfig {
public:
static CompilerHwInfoConfig *get() {
static CompilerHwInfoConfigHw<gfxProduct> instance;
return &instance;
}
bool isMidThreadPreemptionSupported(const HardwareInfo &hwInfo) const override;
bool isForceEmuInt32DivRemSPRequired() const override;
bool isStatelessToStatefulBufferOffsetSupported() const override;
bool isForceToStatelessRequired() const override;
void adjustHwInfoForIgc(HardwareInfo &hwInfo) const override;
void setProductConfigForHwInfo(HardwareInfo &hwInfo, AheadOfTimeConfig config) const override;
protected:
CompilerHwInfoConfigHw() = default;
};
template <PRODUCT_FAMILY gfxProduct>
struct EnableCompilerHwInfoConfig {
typedef typename HwMapper<gfxProduct>::GfxProduct GfxProduct;
EnableCompilerHwInfoConfig() {
CompilerHwInfoConfig *pCompilerHwInfoConfig = CompilerHwInfoConfigHw<gfxProduct>::get();
CompilerHwInfoConfigFactory[gfxProduct] = pCompilerHwInfoConfig;
}
};
} // namespace NEO