Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/bench' into bench
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Lykov committed Dec 22, 2023
2 parents 27b9999 + b52d487 commit 576acfb
Show file tree
Hide file tree
Showing 13 changed files with 3,089 additions and 3,006 deletions.
4 changes: 4 additions & 0 deletions bench/qc_simulation/src/simulators/qtensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ def simulate_tn(prep_data,
import time
from qtensor.contraction_algos import bucket_elimination
from qtensor.compression.Compressor import CUSZCompressor, CUSZXCompressor, TorchCompressor, NEWSZCompressor
from qtensor.compression.Compressor import WriteToDiskCompressor
import cupy
cupy.cuda.profiler.start()
peo, par_vars, tn = prep_data
Expand All @@ -184,6 +185,9 @@ def simulate_tn(prep_data,
print(f"{r2r_error=} {r2r_threshold=}")
compressor = NEWSZCompressor(r2r_error=r2r_error, r2r_threshold=r2r_threshold)
compressor = qtensor.compression.ProfileCompressor(compressor)
elif compress == 'disk':
compressor = WriteToDiskCompressor(f'/grand/QTensor/compression/data/tensors_compressed_M{M}/')
compressor = qtensor.compression.ProfileCompressor(compressor)
else:
raise ValueError(f"Unknown compression algorithm: {compress}")
backend = qtensor.contraction_backends.CompressionBackend(backend, compressor, M)
Expand Down
Loading

0 comments on commit 576acfb

Please sign in to comment.