Commit 6bb59e94 authored by zhuwenwen's avatar zhuwenwen
Browse files

fix build error

parent af7f4372
...@@ -387,10 +387,10 @@ class ScalarTypeTorch : public torch::CustomClassHolder, public ScalarType { ...@@ -387,10 +387,10 @@ class ScalarTypeTorch : public torch::CustomClassHolder, public ScalarType {
// This needs to be implemented and throw a TypeError in order for // This needs to be implemented and throw a TypeError in order for
// PyTorch's opcheck to work on ops that use ScalarTypes. // PyTorch's opcheck to work on ops that use ScalarTypes.
int64_t len() const { // int64_t len() const {
throw c10::TypeError("__len__ not implemented"); // throw c10::TypeError("__len__ not implemented");
return 0; // return 0;
} // }
// Serialize a ScalarType into a tuple of pairs. Where each pair // Serialize a ScalarType into a tuple of pairs. Where each pair
// is a (fieldname, value). // is a (fieldname, value).
...@@ -483,7 +483,7 @@ class ScalarTypeTorch : public torch::CustomClassHolder, public ScalarType { ...@@ -483,7 +483,7 @@ class ScalarTypeTorch : public torch::CustomClassHolder, public ScalarType {
self.get()->min()); self.get()->min());
}); });
bind_function(cls, "__len__", &ScalarTypeTorch::len); // bind_function(cls, "__len__", &ScalarTypeTorch::len);
bind_function(cls, "__str__", &Base::str); bind_function(cls, "__str__", &Base::str);
bind_function(cls, "__eq__", [](SelfPtr const& self, SelfPtr const& other) { bind_function(cls, "__eq__", [](SelfPtr const& self, SelfPtr const& other) {
return *self == *other; return *self == *other;
......
...@@ -409,7 +409,7 @@ try: ...@@ -409,7 +409,7 @@ try:
import vllm.commit_id import vllm.commit_id
__commit__ = vllm.commit_id.__commit__ __commit__ = vllm.commit_id.__commit__
except Exception as e: except Exception as e:
warnings.warn(f"Failed to read commit hash:\n{e}", warnings.warn(f"Failed to read commit hash:\\n + str(e)",
RuntimeWarning, RuntimeWarning,
stacklevel=2) stacklevel=2)
__commit__ = "COMMIT_HASH_PLACEHOLDER" __commit__ = "COMMIT_HASH_PLACEHOLDER"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment