mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
Summary: Previously, doRead/doWrite were functions that could return partial reads/writes, and we checked for this case inconsistently in the call sites of serialization.cpp. Now, these functions do NOT return the amount of bytes read/written, and instead handle the necessary checking loop themselves. Fixes #12042. Maybe. Signed-off-by: Edward Z. Yang <ezyang@fb.com> Pull Request resolved: https://github.com/pytorch/pytorch/pull/12143 Differential Revision: D10097027 Pulled By: ezyang fbshipit-source-id: fd222ab8a825bed352153648ad396acfe124a3e1
17 lines
353 B
C++
17 lines
353 B
C++
#ifndef THP_SERIALIZATION_INC
|
|
#define THP_SERIALIZATION_INC
|
|
|
|
#include "generic/serialization.h"
|
|
#include <TH/THGenerateAllTypes.h>
|
|
|
|
#include "generic/serialization.h"
|
|
#include <TH/THGenerateHalfType.h>
|
|
|
|
template <class io>
|
|
void doRead(io fildes, void* buf, size_t nbytes);
|
|
|
|
template <class io>
|
|
void doWrite(io fildes, void* buf, size_t nbytes);
|
|
|
|
#endif
|