projects
/
culture.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
eea23df
)
Update.
author
François Fleuret
<francois@fleuret.org>
Fri, 10 Mar 2023 10:53:44 +0000
(11:53 +0100)
committer
François Fleuret
<francois@fleuret.org>
Fri, 10 Mar 2023 10:53:44 +0000
(11:53 +0100)
main.py
patch
|
blob
|
history
diff --git
a/main.py
b/main.py
index
c01cc8f
..
5b18985
100755
(executable)
--- a/
main.py
+++ b/
main.py
@@
-5,6
+5,9
@@
# Written by Francois Fleuret <francois@fleuret.org>
# Written by Francois Fleuret <francois@fleuret.org>
+# torch.backends.cuda.matmul.allow_tf23
+# torch.autocast(torch.bfloat16)
+
import math, sys, argparse, time, tqdm, itertools, os
import torch, torchvision
import math, sys, argparse, time, tqdm, itertools, os
import torch, torchvision
@@
-15,7
+18,11
@@
import mygpt, tensorstack
######################################################################
######################################################################
-device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
+if torch.cuda.is_available():
+ device = torch.device("cuda")
+ torch.backends.cuda.matmul.allow_tf32 = True
+else:
+ device = torch.device("cpu")
######################################################################
######################################################################
@@
-55,8
+62,6
@@
parser.add_argument("--nb_blocks", type=int, default=12)
parser.add_argument("--dropout", type=float, default=0.1)
parser.add_argument("--dropout", type=float, default=0.1)
-parser.add_argument("--nb_oneshot_blocks", type=int, default=-1)
-
parser.add_argument("--deterministic_synthesis", action="store_true", default=False)
parser.add_argument("--no_checkpoint", action="store_true", default=False)
parser.add_argument("--deterministic_synthesis", action="store_true", default=False)
parser.add_argument("--no_checkpoint", action="store_true", default=False)