ae1fd4bd创建于 2025年3月26日历史提交
#pragma once

#include "torch_npu/csrc/aten/NPUNativeFunctions.h"

namespace torch_npu {
namespace utils {
class OverflowUtil {
public:
    ~OverflowUtil();

    static OverflowUtil *GetInstance()
    {
        static OverflowUtil instance;
        return &instance;
    }

    void EnableOverflowNpu();
    bool CheckOverflowNpu();
    void ClearOverflowNpu();

private:
    OverflowUtil();
    bool hasOverflow = false;
};
}
}