Skip to content

SunDoge/tch-to-pytorch-poc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tch to python poc

Environment

Check pytorch binary flag

python -c "import torch; print(torch._C._GLIBCXX_USE_CXX11_ABI)"

Set env. I'm using miniconda.

export LIBTORCH_CXX11_ABI=0 # based on previous result
export LIBTORCH=$HOME/miniconda3/envs/pt1.6/lib/python3.8/site-packages/torch
export LD_LIBRARY_PATH=${LIBTORCH}/lib:$LD_LIBRARY_PATH

Link the dynamic library

ln -s target/debug/libtch.so tch.so

Run

cargo build
python main.py

You'll see the eye generated by rust.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published