mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
[caffe2] Remove inline keyword of function CUDACachingAllocator::format_size (#100734)
Summary: `CUDACachingAllocator::format_size` is used not only in CUDACachingAllocator.cpp but also in CUDAMallocAsyncAllocator.cpp. This caused a breakage when the compiler inlined the function and the linker couldn't find it when resolving symbols for CUDAMallocAsyncAllocator.cpp. Differential Revision: D45612790 Pull Request resolved: https://github.com/pytorch/pytorch/pull/100734 Approved by: https://github.com/interwq, https://github.com/kit1980
This commit is contained in:
parent
4447dfa673
commit
5ef50ef2d8
|
|
@ -3525,7 +3525,7 @@ void setAllocatorSettings(const std::string& env) {
|
|||
}
|
||||
|
||||
// Size pretty-printer
|
||||
inline std::string format_size(uint64_t size) {
|
||||
std::string format_size(uint64_t size) {
|
||||
std::ostringstream os;
|
||||
os.precision(2);
|
||||
os << std::fixed;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user