Skip to content
Snippets Groups Projects
Select Git revision
1 result Searching

exampleTorch.py

Blame
    • Carl Philipp Klemm's avatar
      2bde3497
      Finnaly manage to support torch script exection · 2bde3497
      Carl Philipp Klemm authored
      Note: for varous reasons torchScript compilation va torch.jit was not possible,
      on the python side the system insits on file resident code for traceing, with no recourse
      on the c++ the object is subltly different from the code used internally in the compile
      performed after traceing, breaking pytorchs usual bindings.
      By shipping own code based on the traceing path in an c++ torch extension the c++ path to
      torch::jit compilation would be possible, but this is a lot of effort.
      
      instead the usual cpython and pytoch -> libtorch is used instead this negatively affects performance
      when compeared to the usual case of torch::jit::compile used when using eisgenerator directly from c++
      2bde3497
      History
      Finnaly manage to support torch script exection
      Carl Philipp Klemm authored
      Note: for varous reasons torchScript compilation va torch.jit was not possible,
      on the python side the system insits on file resident code for traceing, with no recourse
      on the c++ the object is subltly different from the code used internally in the compile
      performed after traceing, breaking pytorchs usual bindings.
      By shipping own code based on the traceing path in an c++ torch extension the c++ path to
      torch::jit compilation would be possible, but this is a lot of effort.
      
      instead the usual cpython and pytoch -> libtorch is used instead this negatively affects performance
      when compeared to the usual case of torch::jit::compile used when using eisgenerator directly from c++
    Player.cpp 2.31 KiB