How can I change nccl version in pytorch?

According to above answer, NCCL is statically linked to pytorch. Therefore, the only way is to compile from source.

Is LD_PRELOAD possible?