mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-05 08:37:06 +08:00
polish code with new pre-commit rule (#2923)
This commit is contained in:
@@ -32,6 +32,7 @@ class Platform:
|
||||
"""
|
||||
Platform base class, all device class will be derived from it
|
||||
"""
|
||||
|
||||
device_name: str
|
||||
|
||||
def is_cuda(self) -> bool:
|
||||
@@ -87,9 +88,7 @@ class Platform:
|
||||
Verify whether the quantization is supported by the current platform.
|
||||
"""
|
||||
if self.supported_quantization and quant not in self.supported_quantization:
|
||||
raise ValueError(
|
||||
f"{quant} quantization is currently not supported in "
|
||||
f"{self.device_name}.")
|
||||
raise ValueError(f"{quant} quantization is currently not supported in " f"{self.device_name}.")
|
||||
|
||||
@classmethod
|
||||
def available(self):
|
||||
|
Reference in New Issue
Block a user