mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[2/N] Fix some violations of unused-function and unused-variable checks in torch_cpu (#129878)
Follows #128670 Pull Request resolved: https://github.com/pytorch/pytorch/pull/129878 Approved by: https://github.com/ezyang
This commit is contained in:
@ -335,11 +335,13 @@ class class_ : public ::torch::detail::class_base {
|
||||
|
||||
// type validation
|
||||
auto getstate_schema = classTypePtr->getMethod("__getstate__").getSchema();
|
||||
#ifndef STRIP_ERROR_MESSAGES
|
||||
auto format_getstate_schema = [&getstate_schema]() {
|
||||
std::stringstream ss;
|
||||
ss << getstate_schema;
|
||||
return ss.str();
|
||||
};
|
||||
#endif
|
||||
TORCH_CHECK(
|
||||
getstate_schema.arguments().size() == 1,
|
||||
"__getstate__ should take exactly one argument: self. Got: ",
|
||||
|
Reference in New Issue
Block a user