400Ping commented on PR #928:
URL: https://github.com/apache/mahout/pull/928#issuecomment-3791509683
Before:
```
$ python qdp-python/benchmark/benchmark_e2e.py --encoding-method angle
Generating 200 samples of 16 qubits...
Generated 200 samples
Parquet: 0.03 MB, Arrow IPC: 0.02 MB
======================================================================
E2E BENCHMARK: 16 Qubits, 200 Samples
======================================================================
[PennyLane] Full Pipeline (Disk -> GPU) - angle encoding...
IO Time: 0.0065 s
/home/jay/work/mahout/qdp/qdp-python/benchmark/benchmark_e2e.py:284:
UserWarning: Casting complex values to real discards the imaginary part
(Triggered internally at ../aten/src/ATen/native/Copy.cpp:301.)
state_gpu = state_cpu.to("cuda", dtype=torch.float32)
Total Time: 1.0379 s
[Mahout-Parquet] Full Pipeline (Parquet -> GPU)...
Parquet->GPU (IO+Encode): 0.2768 s
DLPack conversion: 0.0001 s
Convert to float32: 0.0036 s
Total Time: 0.3000 s
======================================================================
E2E LATENCY (Lower is Better)
Samples: 200, Qubits: 16
======================================================================
Mahout-Parquet 0.3000 s
PennyLane 1.0379 s
----------------------------------------------------------------------
Speedup vs PennyLane: 3.46x
======================================================================
VERIFICATION (Mahout-Parquet vs PennyLane)
======================================================================
Max Probability Difference: 2.27e-01
Max Amplitude Difference: 4.77e-01
>> FAILURE: States do not match.
```
After:
```
$ python qdp-python/benchmark/benchmark_e2e.py --encoding-method angle
Generating 200 samples of 16 qubits...
Generated 200 samples
Parquet: 0.03 MB, Arrow IPC: 0.02 MB
======================================================================
E2E BENCHMARK: 16 Qubits, 200 Samples
======================================================================
[PennyLane] Full Pipeline (Disk -> GPU) - angle encoding...
IO Time: 0.0069 s
/home/jay/work/mahout/qdp/qdp-python/benchmark/benchmark_e2e.py:284:
UserWarning: Casting complex values to real discards the imaginary part
(Triggered internally at ../aten/src/ATen/native/Copy.cpp:301.)
state_gpu = state_cpu.to("cuda", dtype=torch.float32)
Total Time: 1.0985 s
[Mahout-Parquet] Full Pipeline (Parquet -> GPU)...
Parquet->GPU (IO+Encode): 0.2896 s
DLPack conversion: 0.0001 s
Convert to float32: 0.0034 s
Total Time: 0.3127 s
======================================================================
E2E LATENCY (Lower is Better)
Samples: 200, Qubits: 16
======================================================================
Mahout-Parquet 0.3127 s
PennyLane 1.0985 s
----------------------------------------------------------------------
Speedup vs PennyLane: 3.51x
======================================================================
VERIFICATION (Mahout-Parquet vs PennyLane)
======================================================================
Max Probability Difference: 2.27e-01
Max Amplitude Difference: 4.77e-01
>> FAILURE: States do not match.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]