因為dgl分gpu版和cpu版,估計默認安裝的是cpu版本,所以無法調用cuda,解決方法
https://www.dgl.ai/pages/start.html,選擇指定版本進行安裝即可,如果在安裝后,訪問cuda時出現以下錯誤
/opt/dgl/src/runtime/c_runtime_api.cc:88: Check failed: allow_missing: Device API gpu is not enabled. Please install the cuda version of dgl.
可以降低安裝的dgl的cuda版本,如果11.0出現錯誤,就安裝10.2試試

