Transclude of NOW

bash ad_platform/astra/compiler/pytorch/torch_env.sh    
 
# 可能得手动
source /data/torch_conda_env/bin/activate base    
pip3 install torch --index-url https://download.pytorch.org/whl/cu121
 
ln -s /data/torch_conda_env/lib/python3.10/site-packages/torch/lib/libcusparseLt-f80c68d1.so.0 /data/torch_conda_env/lib/python3.10/site-packages/torch/lib/libcusparseLt.so.0
 
# 运行单测  
bazel test //ad_platform/preranking/pytorch_demo:preranking_model_test --test_output=all
  • 看上去让Preranking + torch 编译还是好编译过的,运行时可能得依赖一个 conda 环境?

  • 貌似有不用 conda 的方式