[PrivateUse1] Impl isBuilt() and isAvailable() (#149594)

Follow-up: #146098

Pull Request resolved: https://github.com/pytorch/pytorch/pull/149594
Approved by: https://github.com/albanD
This commit is contained in:
Yuanhao Ji 2025-03-31 04:18:35 +00:00 committed by PyTorch MergeBot
parent 46c8f2e965
commit 32afecff8b

View File

@ -23,6 +23,14 @@ struct TORCH_API PrivateUse1HooksInterface : AcceleratorHooksInterface {
~PrivateUse1HooksInterface() override = default;
bool isBuilt() const override {
FAIL_PRIVATEUSE1HOOKS_FUNC(__func__);
}
bool isAvailable() const override {
FAIL_PRIVATEUSE1HOOKS_FUNC(__func__);
}
const at::Generator& getDefaultGenerator(
c10::DeviceIndex device_index) const override {
FAIL_PRIVATEUSE1HOOKS_FUNC(__func__);