pytorch
004bb34f - inductor: fix vision_maskrcnn dynamic_shapes error on CPU (#97312)

Commit
1 year ago
inductor: fix vision_maskrcnn dynamic_shapes error on CPU (#97312) Fix several c++ compilation errors in `vision_maskrcnn` in dynamic_shapes cases: 1. convert `ceiling` to `std::ceil` in `CppPrinter`: ```bash error: ‘ceiling’ was not declared in this scope 17 | for(long i1=0; i1<ceiling(1.8735363483429*ks1); i1+=1) ``` 2. convert index in `store` to `INDEX_TYPE`: ```bash error: invalid types ‘float*[double]’ for array subscript 52 | out_ptr0[i2 + (i1*(floor(1.8735363483429*ks2))) + (i0*(std::ceil((1.87353634834290*ks1)))*(floor(1.8735363483429*ks2)))] = tmp30; ``` 3. convert offset, size, steps in loop to `INDEX_TYPE`: ```bash error: invalid controlling predicate 16 | for(long i1=0; i1<std::ceil((1.87353634834290*ks1)); i1+=1) ``` 4. convert index in `load` to `INDEX_TYPE`: ```bash error: invalid types ‘float*[double]’ for array subscript 64 | auto tmp0 = out_ptr0[i1 + (i0*(floor(1.8735363483429*ks2)))]; ``` Pull Request resolved: https://github.com/pytorch/pytorch/pull/97312 Approved by: https://github.com/EikanWang, https://github.com/jgong5, https://github.com/jansel
Author
Committer
Parents
Loading