mirror of
https://github.com/Cian-H/symbolic_nn_tests.git
synced 2025-12-22 22:22:01 +00:00
Added automatic enabling of tensor cores
This commit is contained in:
791
poetry.lock
generated
791
poetry.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -27,6 +27,13 @@ def main(
|
|||||||
bool, typer.Option(help="Whether or not to log via Weights & Biases")
|
bool, typer.Option(help="Whether or not to log via Weights & Biases")
|
||||||
] = True,
|
] = True,
|
||||||
):
|
):
|
||||||
|
import torch
|
||||||
|
|
||||||
|
# Enable tensor cores for compatible GPUs
|
||||||
|
for i in torch.cuda.device_count():
|
||||||
|
if torch.cuda.get_device_properties(i).major > 6:
|
||||||
|
torch.set_float32_matmul_precision("medium")
|
||||||
|
|
||||||
for i, n in enumerate(experiments, start=1):
|
for i, n in enumerate(experiments, start=1):
|
||||||
j = n - 1
|
j = n - 1
|
||||||
experiment = EXPERIMENTS[j].run
|
experiment = EXPERIMENTS[j].run
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ def get_singleton_dataset():
|
|||||||
from symbolic_nn_tests.experiment2.dataset import collate, pubchem
|
from symbolic_nn_tests.experiment2.dataset import collate, pubchem
|
||||||
|
|
||||||
return create_dataset(
|
return create_dataset(
|
||||||
dataset=pubchem, collate_fn=collate, batch_size=128, shuffle=True
|
dataset=pubchem, collate_fn=collate, batch_size=512, shuffle=True
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user