OK, I finally solved the above problem.
Usually I update pytorch source via command “git pull”,
which is increment download method (except the first time full download).
Somehow in this process two files onnxifi_loader.c and onnxifi_loader.h
was missing! This time I did full download via command
git clone --recursive https://github.com/pytorch/pytorch 8
Then the above two files onnxifi_loader.c and onnxifi_loader.h
appear, and compile pytorch completed successfully.