pytorch
76bcc872 - fix TIMM mobilevit_s complier issue for dynamic CPU path (#100230)

Commit
2 years ago
fix TIMM mobilevit_s complier issue for dynamic CPU path (#100230) For TIMM ```mobilevit``` dynamic path, there has a compiler issue(``` python -m torch.backends.xeon.run_cpu --node_id 0 benchmarks/dynamo/timm_models.py --performance --float32 -dcpu -n2 --inductor --no-skip --dashboard --only mobilevit_s --inference --dynamic-shapes``` ): ``` /tmp/torchinductor_xiaobing/xy/cxyslqzcsxkco4ieph7t63kn5q74ka35ak75lwfon32nlalxmru5.cpp:29:130: error: invalid operands of types ‘long int’ and ‘double’ to binary ‘operator%’ 29 | auto tmp0 = in_ptr0[static_cast<long>((((((-1L) + ks1) / 8L)*(((-1L) + ks1) / 8L))*((((2L*((i2 / 1L) % (std::ceil((1.0/2.0) + ((1.0/2.0)*(((-1L) + ks1) ``` There has a modulo for ```long % double```, this PR will convert inputs to long before do this operation. Pull Request resolved: https://github.com/pytorch/pytorch/pull/100230 Approved by: https://github.com/jansel
Author
Committer
Parents
Loading