From 542f51c6b6695eb8eae96f2b85c1c40b13e78d52 Mon Sep 17 00:00:00 2001 From: Harrison Date: Sat, 18 Mar 2023 16:38:23 +1100 Subject: [PATCH] save --- src/rwkvstic/agnostic/backends/opt.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/rwkvstic/agnostic/backends/opt.py b/src/rwkvstic/agnostic/backends/opt.py index 64f4186..9fe5755 100644 --- a/src/rwkvstic/agnostic/backends/opt.py +++ b/src/rwkvstic/agnostic/backends/opt.py @@ -12,14 +12,12 @@ import os current_path = os.path.dirname(os.path.abspath(__file__)) -# method = torch.jit.script_method -# module = torch.jit.ScriptModule -# script = torch.jit.script -method = lambda x:x #.script_method -module = torch.nn.Module #.ScriptModule -script = lambda x:x #.script +method = torch.jit.script_method +module = torch.jit.ScriptModule +script = torch.jit.script with torch.no_grad(): def OptRWKV(path, jit=True, export=False, **kwargs): + device = "cuda"