Fix broken lint after #116876 (#122253)

Trivial fixes, so let's do this instead of reverting the change.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/122253
Approved by: https://github.com/clee2000
This commit is contained in:
Huy Do 2024-03-20 04:08:58 +00:00 committed by PyTorch MergeBot
parent de950039fc
commit dc89d8b74a
2 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@ inline void* CPUCachingAllocator::allocate_and_cache(const size_t bytes) {
void* ptr;
try {
ptr = c10::alloc_cpu(bytes);
} catch (c10::Error& ) {
} catch (c10::Error&) {
// If allocation fails, try freeing cached available blocks.
// For now free all available cached blocks.
free_cached();

View File

@ -78,7 +78,7 @@ C10_EXPORT int stringToKind(const std::string& str) {
}();
try {
return str_to_kind.at(str);
} catch (std::out_of_range& ) {
} catch (std::out_of_range&) {
throw std::out_of_range("unknown token in stringToKind");
}
}