Fix Intel ONNX runtime
This commit is contained in:
@@ -233,7 +233,20 @@ namespace ANSCENTER {
|
||||
if (engine == EngineType::AMD_GPU) {
|
||||
session_options.DisableMemPattern();
|
||||
session_options.SetExecutionMode(ExecutionMode::ORT_SEQUENTIAL);
|
||||
ANS_DBG("OrtHandler", "DirectML: DisableMemPattern + ORT_SEQUENTIAL set");
|
||||
|
||||
// DirectML 1.15.4 (the latest; Microsoft has moved DirectML into
|
||||
// sustained engineering only) has a deterministic crash path in
|
||||
// amdkmdag.sys +0xf03d on RDNA2 iGPUs (Radeon 680M on Ryzen 6000)
|
||||
// when ORT_ENABLE_ALL applies layout-reorder transforms to
|
||||
// YOLO-style conv graphs. Downgrade to EXTENDED on DML: still
|
||||
// keeps constant folding and Conv+BN+ReLU fusion (the big wins),
|
||||
// drops the risky layout transforms. Perf impact on YOLO is
|
||||
// typically under 5%.
|
||||
session_options.SetGraphOptimizationLevel(
|
||||
GraphOptimizationLevel::ORT_ENABLE_EXTENDED);
|
||||
|
||||
ANS_DBG("OrtHandler",
|
||||
"DirectML: DisableMemPattern + ORT_SEQUENTIAL + EXTENDED opt");
|
||||
}
|
||||
|
||||
std::vector<std::string> available = Ort::GetAvailableProviders();
|
||||
|
||||
@@ -294,6 +294,10 @@ namespace ANSCENTER {
|
||||
|
||||
BasicOrtHandler(const BasicOrtHandler&) = delete;
|
||||
BasicOrtHandler& operator=(const BasicOrtHandler&) = delete;
|
||||
public:
|
||||
// Resolved EP type (after EPLoader fallback). Subclasses use this
|
||||
// to branch on actual EP at inference time.
|
||||
EngineType getEngineType() const { return m_engineType; }
|
||||
private:
|
||||
void initialize_handler();
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user