add PARROTS_JIT_OPTION (#816)

* code update

* add PARROTS_JIT_OPTION

* rm flow_warp_module

* fix for lint

* small fix
pull/823/head
lml131 2021-02-05 19:58:33 +08:00 committed by GitHub
parent 5df759ad44
commit 4a694cc0ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,10 @@
import os
from .parrots_wrapper import TORCH_VERSION
if TORCH_VERSION == 'parrots':
parrots_jit_option = os.getenv('PARROTS_JIT_OPTION')
if TORCH_VERSION == 'parrots' and parrots_jit_option == 'ON':
from parrots.jit import pat as jit
else: