• G
    Fix bug of block desc. (#53163) (#53176) · 7adecf40
    Ghost Screaming 提交于
    * Fix bug of reduce_sum op. When input.numel() > INT32_MAX, its result
    is wrong.
    
    * Remove climits.
    
    * Fix bug of BlockDesc::MoveFrom(). It's used to rebuild main_program_desc from ProgramDesc modified by Fusion Pass. As some fused operators need to create new Variables in modified ProgramDesc, MoveFrom function uses std::move() function to move these VarDesc to main_program_desc. As a result, their pointers holded by modified ProgramDesc become nullptr. When call block()->Program()->proto() function, it will call ProgramDesc::Flush() function at first, which may cause a segmentation fault.
    7adecf40
block_desc.cc 11.3 KB