Apply suggestions from code review
Co-authored-by: Huazhong Ji <hzji210@gmail.com>
This commit is contained in:
parent
28ae947161
commit
0ac6e73f99
|
@ -1,6 +1,4 @@
|
||||||
import os
|
import os
|
||||||
import torch
|
|
||||||
import torch_npu
|
|
||||||
from torch_npu.contrib import transfer_to_npu
|
from torch_npu.contrib import transfer_to_npu
|
||||||
from llmtuner.train.tuner import run_exp
|
from llmtuner.train.tuner import run_exp
|
||||||
|
|
||||||
|
@ -15,6 +13,7 @@ def _mp_fn(index):
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
use_jit_compile = os.getenv('JIT_COMPILE', 'False').lower() in ['true', '1']
|
if is_torch_npu_available():
|
||||||
torch.npu.set_compile_mode(jit_compile=use_jit_compile)
|
use_jit_compile = os.getenv('JIT_COMPILE', 'False').lower() in ['true', '1']
|
||||||
|
torch.npu.set_compile_mode(jit_compile=use_jit_compile)
|
||||||
main()
|
main()
|
||||||
|
|
Loading…
Reference in New Issue