Skip to content

Commit

Permalink
fix linter problems
Browse files Browse the repository at this point in the history
  • Loading branch information
akrzgc committed Oct 27, 2023
1 parent 4781c12 commit ca1755c
Showing 1 changed file with 25 additions and 7 deletions.
32 changes: 25 additions & 7 deletions test/test_benchmark_performance.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@
@pytest.mark.parametrize("molecule", ["methane", "benzene"])
def test_dense_eri(molecule):

opts, mol_str = nanoDFT_options(float32 = True, mol_str=molecule, backend="ipu")
opts, mol_str = nanoDFT_options(
float32 = True,
mol_str=molecule,
backend="ipu"
)
mol = build_mol(mol_str, opts.basis)

_, _, ipu_cycles_stamps = nanoDFT(mol, opts, profile_performance=True)
Expand All @@ -49,11 +53,15 @@ def test_dense_eri(molecule):
end = np.asarray(end)

diff = (end - start)[0][0][0]
print("----------------------------------------------------------------------------")
print(
"----------------------------------------------------------------------------"
)
print(" Diff cycle count:", diff)
print(" Diff cycle count [M]:", diff/1e6)
print("Estimated time of execution on Bow-IPU [seconds]:", diff/(1.85*1e9))
print("----------------------------------------------------------------------------")
print(
"----------------------------------------------------------------------------"
)

assert True

Expand All @@ -62,7 +70,13 @@ def test_dense_eri(molecule):
@pytest.mark.parametrize("molecule", ["methane", "benzene", "c20"])
def test_sparse_eri(molecule):

opts, mol_str = nanoDFT_options(float32 = True, mol_str=molecule, backend="ipu", dense_ERI=False, eri_threshold=1e-9)
opts, mol_str = nanoDFT_options(
float32=True,
mol_str=molecule,
backend="ipu",
dense_ERI=False,
eri_threshold=1e-9
)
mol = build_mol(mol_str, opts.basis)

_, _, ipu_cycles_stamps = nanoDFT(mol, opts, profile_performance=True)
Expand All @@ -72,10 +86,14 @@ def test_sparse_eri(molecule):
end = np.asarray(end)

diff = (end - start)[0][0][0]
print("----------------------------------------------------------------------------")
print(
"----------------------------------------------------------------------------"
)
print(" Diff cycle count:", diff)
print(" Diff cycle count [M]:", diff/1e6)
print("Estimated time of execution on Bow-IPU [seconds]:", diff/(1.85*1e9))
print("----------------------------------------------------------------------------")
print(
"----------------------------------------------------------------------------"
)

assert True
assert True

0 comments on commit ca1755c

Please sign in to comment.