@zw19906 @Stevers  sorry for late response, I figured out how to build torch on macOS 10.13.6 + CUDA 10.1(update 2) + cudnn 7.6.5.
Just summarize in pytorch/pytorch#46803 8 and google/XNNPACK#1081 6 for your reference. But,  honestly speaking, I thought XNNPACK might have more potential bugs for code generation template. Anyway make torch building for avx passing…