diffcb 0.1.13__tar.gz → 0.1.14__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- diffcb-0.1.14/02_projects/01_dcb_proposal/04_analysis/results/round42_fp64_diag_dcb.csv +17 -0
- diffcb-0.1.14/02_projects/01_dcb_proposal/04_analysis/results/round42_fp64_diag_ops.csv +13 -0
- diffcb-0.1.14/02_projects/01_dcb_proposal/04_analysis/results/round42_fp64_diag_summary.txt +79 -0
- diffcb-0.1.14/02_projects/01_dcb_proposal/04_analysis/results/round43_c1_benchmark.csv +13 -0
- diffcb-0.1.14/02_projects/01_dcb_proposal/04_analysis/results/round43_c1_benchmark.log +37 -0
- diffcb-0.1.14/02_projects/01_dcb_proposal/04_analysis/results/round43_c1_summary.txt +18 -0
- diffcb-0.1.14/02_projects/01_dcb_proposal/04_analysis/results/round43_correctness.log +124 -0
- diffcb-0.1.14/02_projects/01_dcb_proposal/04_analysis/results/round44_b5_benchmark.csv +11 -0
- diffcb-0.1.14/02_projects/01_dcb_proposal/04_analysis/results/round44_b5_benchmark_remote.csv +11 -0
- diffcb-0.1.14/02_projects/01_dcb_proposal/04_analysis/results/round44_b5_summary.txt +26 -0
- diffcb-0.1.14/02_projects/01_dcb_proposal/04_analysis/results/round44_b5_summary_remote.txt +26 -0
- diffcb-0.1.14/02_projects/01_dcb_proposal/04_analysis/results/round44_benchmark.log +101 -0
- diffcb-0.1.14/02_projects/01_dcb_proposal/04_analysis/results/round44_gradcheck.log +92 -0
- diffcb-0.1.14/02_projects/01_dcb_proposal/04_analysis/round42_fp64_diag.py +894 -0
- diffcb-0.1.14/02_projects/01_dcb_proposal/04_analysis/round43_c1_benchmark.py +204 -0
- diffcb-0.1.14/02_projects/01_dcb_proposal/04_analysis/round43_c1_correctness.py +107 -0
- diffcb-0.1.14/02_projects/01_dcb_proposal/04_analysis/round44_b5_benchmark.py +193 -0
- diffcb-0.1.14/02_projects/01_dcb_proposal/04_analysis/round44_b5_gradcheck.py +259 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/PKG-INFO +1 -1
- {diffcb-0.1.13 → diffcb-0.1.14}/dcb/__init__.py +1 -1
- {diffcb-0.1.13 → diffcb-0.1.14}/dcb/fft_kde.py +222 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/dcb/layer.py +133 -3
- {diffcb-0.1.13 → diffcb-0.1.14}/dcb/solver.py +14 -6
- {diffcb-0.1.13 → diffcb-0.1.14}/dcb/training.py +109 -9
- {diffcb-0.1.13 → diffcb-0.1.14}/pyproject.toml +1 -1
- {diffcb-0.1.13 → diffcb-0.1.14}/tests/test_solver.py +8 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/.gitignore +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/.zenodo.json +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/02_projects/01_dcb_proposal/04_analysis/results/round-41-p100-batch-benchmark.log +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/02_projects/01_dcb_proposal/04_analysis/results/round37_s3_convergence_guard.csv +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/02_projects/01_dcb_proposal/04_analysis/results/round37_s3_convergence_p3fix.csv +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/02_projects/01_dcb_proposal/04_analysis/results/round37_s3_convergence_post.csv +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/02_projects/01_dcb_proposal/04_analysis/results/round37_s3_convergence_pre.csv +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/02_projects/01_dcb_proposal/04_analysis/results/round37_s3_guard_clear_stats.txt +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/02_projects/01_dcb_proposal/04_analysis/results/round37_s3_summary.txt +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/02_projects/01_dcb_proposal/04_analysis/results/round38.log +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/02_projects/01_dcb_proposal/04_analysis/results/round38_accuracy_indep_sample.csv +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/02_projects/01_dcb_proposal/04_analysis/results/round38_accuracy_same_sample.csv +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/02_projects/01_dcb_proposal/04_analysis/results/round38_full.log +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/02_projects/01_dcb_proposal/04_analysis/results/round38_large_n_timing.csv +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/02_projects/01_dcb_proposal/04_analysis/results/round38_summary.txt +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/02_projects/01_dcb_proposal/04_analysis/results/round38_timing_vs_R.csv +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/02_projects/01_dcb_proposal/04_analysis/results/round38_vs_R_benchmark.py +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/02_projects/01_dcb_proposal/04_analysis/results/round39_b1_benchmark.csv +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/02_projects/01_dcb_proposal/04_analysis/results/round39_b1_benchmark.log +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/02_projects/01_dcb_proposal/04_analysis/results/round39_b1_summary.txt +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/02_projects/01_dcb_proposal/04_analysis/results/round39_b2.log +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/02_projects/01_dcb_proposal/04_analysis/results/round39_b2_benchmark.csv +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/02_projects/01_dcb_proposal/04_analysis/results/round39_b2_summary.txt +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/02_projects/01_dcb_proposal/04_analysis/results/round39_correctness.log +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/02_projects/01_dcb_proposal/04_analysis/results/round40_a1_bench.log +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/02_projects/01_dcb_proposal/04_analysis/results/round40_a1_benchmark.log +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/02_projects/01_dcb_proposal/04_analysis/results/round40_a1_benchmark_partial.log +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/02_projects/01_dcb_proposal/04_analysis/results/round40_correctness.log +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/02_projects/01_dcb_proposal/04_analysis/results/round41_p100_accuracy.csv +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/02_projects/01_dcb_proposal/04_analysis/results/round41_p100_batch_throughput.csv +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/02_projects/01_dcb_proposal/04_analysis/results/round41_p100_fp64_vs_fp32.csv +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/02_projects/01_dcb_proposal/04_analysis/results/round41_p100_speedup_vs_R.csv +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/02_projects/01_dcb_proposal/04_analysis/results/round41_p100_summary.txt +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/02_projects/01_dcb_proposal/04_analysis/round37_s3_convergence.py +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/02_projects/01_dcb_proposal/04_analysis/round37_s3_convergence_guard.py +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/02_projects/01_dcb_proposal/04_analysis/round37_s3_convergence_p3fix.py +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/02_projects/01_dcb_proposal/04_analysis/round37_s3_validation_remote.py +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/02_projects/01_dcb_proposal/04_analysis/round38_vs_R_benchmark.py +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/02_projects/01_dcb_proposal/04_analysis/round38_vs_R_rerun.py +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/02_projects/01_dcb_proposal/04_analysis/round39_b1_benchmark.py +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/02_projects/01_dcb_proposal/04_analysis/round39_b1_correctness.py +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/02_projects/01_dcb_proposal/04_analysis/round39_b2_benchmark.py +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/02_projects/01_dcb_proposal/04_analysis/round40_a1_benchmark.py +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/02_projects/01_dcb_proposal/04_analysis/round40_a1_correctness.py +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/02_projects/01_dcb_proposal/04_analysis/round41_p100_batch_bench.py +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/LICENSE +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/README.md +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/dcb/diagnostics.py +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/dcb/kde.py +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/dcb/utils.py +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/notebooks/.gitkeep +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/round-41-p100-batch-benchmark.log +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/round24_cumulative_bench.py +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/round24_v016_test.py +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/round25_full_range_sweep.py +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/round25_write_csv.py +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/tests/test_gradcheck.py +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/tests/test_kde.py +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/tests/test_layer.py +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/tests/test_r18c_denom_audit.py +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/tests/test_r18c_deprecation_warn.py +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/tests/test_r19_default_fft.py +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/tests/test_r19_diagnostics.py +0 -0
- {diffcb-0.1.13 → diffcb-0.1.14}/v018_local_bench.py +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
phase,n,ms,note
|
|
2
|
+
precompute_fft_f32,50000,0.5517,histogram+rfft float32
|
|
3
|
+
precompute_fft_f64,50000,0.5468,histogram+rfft float64 (C_mc)
|
|
4
|
+
mode_count_from_C_single,50000,0.2722,irfft+sign_detect float64 single call
|
|
5
|
+
mode_count_from_C_batch2,50000,0.3697,irfft+sign_detect float64 batch B=2 (one trisection step)
|
|
6
|
+
trisection_16_rounds,50000,7.4257,16x mode_count_from_C_batch float64
|
|
7
|
+
_refine_hcrit,50000,1.7154,_refine_hcrit float64
|
|
8
|
+
full_forward_f64,50000,74.5462,DCBLayer.forward float64 (reference)
|
|
9
|
+
full_forward_f32,50000,237.1963,DCBLayer.forward float32
|
|
10
|
+
measured_subtotal,50000,10.2396,pre_f32+pre_f64+trisection+refine
|
|
11
|
+
forward_batched_total,16,50000,868.6899,total forward_batched fp64 K=16 n=50K
|
|
12
|
+
serial_total,16,50000,3913.1577,K sequential forward calls fp64
|
|
13
|
+
speedup,16,50000,4.5047,serial/batch speedup ratio
|
|
14
|
+
precompute_fft_batch_f32,16,50000,23.4957,K histograms + batched rfft float32
|
|
15
|
+
precompute_fft_batch_f64,16,50000,31.4592,K histograms + batched rfft float64
|
|
16
|
+
mode_count_K_batch_1round,16,50000,2.8570,batched irfft+sign K=16 B=2 (one round)
|
|
17
|
+
trisection_16R_estimate,16,50000,45.7114,estimated 16 rounds trisection K=16
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
op,size,fp32_ms,fp64_ms,ratio
|
|
2
|
+
rfft,16384,0.012288,0.149504,12.1667
|
|
3
|
+
irfft,16384,0.017408,0.155648,8.9412
|
|
4
|
+
exp,16384,0.010240,0.026400,2.5781
|
|
5
|
+
mul,16384,0.008192,0.009216,1.1250
|
|
6
|
+
sum,16384,0.008192,0.012288,1.5000
|
|
7
|
+
histogram,16384,0.019456,0.028960,1.4885
|
|
8
|
+
rfft,32768,0.020480,0.061440,3.0000
|
|
9
|
+
irfft,32768,0.026624,0.065536,2.4615
|
|
10
|
+
exp,32768,0.034944,0.017408,0.4982
|
|
11
|
+
mul,32768,0.008192,0.027648,3.3750
|
|
12
|
+
sum,32768,0.012192,0.020480,1.6798
|
|
13
|
+
histogram,32768,0.019520,0.029696,1.5213
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
======================================================================
|
|
2
|
+
Round 42 -- RTX 4060 Laptop fp64 Diagnosis Summary
|
|
3
|
+
======================================================================
|
|
4
|
+
PyTorch : 2.5.1+cu121
|
|
5
|
+
GPU : NVIDIA GeForce RTX 4060 Laptop GPU
|
|
6
|
+
Compute cap : sm_89
|
|
7
|
+
VRAM : 8.6 GB
|
|
8
|
+
|
|
9
|
+
-- Test 1: Isolated fp64 vs fp32 penalty for core operations --------
|
|
10
|
+
op size fp32_ms fp64_ms ratio
|
|
11
|
+
-------------------------------------------------------
|
|
12
|
+
rfft 16,384 0.012288 0.149504 12.1667x
|
|
13
|
+
irfft 16,384 0.017408 0.155648 8.9412x
|
|
14
|
+
exp 16,384 0.010240 0.026400 2.5781x
|
|
15
|
+
mul 16,384 0.008192 0.009216 1.1250x
|
|
16
|
+
sum 16,384 0.008192 0.012288 1.5000x
|
|
17
|
+
histogram 16,384 0.019456 0.028960 1.4885x
|
|
18
|
+
rfft 32,768 0.020480 0.061440 3.0000x
|
|
19
|
+
irfft 32,768 0.026624 0.065536 2.4615x
|
|
20
|
+
exp 32,768 0.034944 0.017408 0.4982x
|
|
21
|
+
mul 32,768 0.008192 0.027648 3.3750x
|
|
22
|
+
sum 32,768 0.012192 0.020480 1.6798x
|
|
23
|
+
histogram 32,768 0.019520 0.029696 1.5213x
|
|
24
|
+
|
|
25
|
+
Worst fp64 penalty: rfft at size=16,384 ratio=12.1667x
|
|
26
|
+
RTX 4060 fp64 TFLOPS ~ 0.25 (1/32 of fp32 8 TFLOPS = compute bottleneck)
|
|
27
|
+
|
|
28
|
+
-- Test 2: DCB forward phase breakdown (n=50K bimodal, fp64) --------
|
|
29
|
+
Full forward fp64 : 74.546 ms
|
|
30
|
+
Full forward fp32 : 237.196 ms
|
|
31
|
+
fp64/fp32 ratio : 0.31x
|
|
32
|
+
(Round 38 baseline was 134ms -- this run should be similar)
|
|
33
|
+
|
|
34
|
+
precompute_fft fp64 : 0.547 ms (0.7% of forward)
|
|
35
|
+
trisection 16R fp64 : 7.426 ms (10.0% of forward) = 0.464 ms/round
|
|
36
|
+
_refine_hcrit fp64 : 1.715 ms (2.3% of forward)
|
|
37
|
+
|
|
38
|
+
-- Test 3: forward_batched breakdown (K=16, n=50K, fp64) ------------
|
|
39
|
+
serial K=16: 3913.158 ms (244.572 ms/dist)
|
|
40
|
+
batched K=16: 868.690 ms (54.293 ms/dist)
|
|
41
|
+
speedup : 4.50x (P100 baseline: 10.7x at K=16)
|
|
42
|
+
|
|
43
|
+
forward_batched_total : 868.6899 ms
|
|
44
|
+
serial_total : 3913.1577 ms
|
|
45
|
+
speedup : 4.5047 ms
|
|
46
|
+
precompute_fft_batch_f32 : 23.4957 ms
|
|
47
|
+
precompute_fft_batch_f64 : 31.4592 ms
|
|
48
|
+
mode_count_K_batch_1round : 2.8570 ms
|
|
49
|
+
trisection_16R_estimate : 45.7114 ms
|
|
50
|
+
|
|
51
|
+
-- Test 4: Memory bandwidth saturation ------------------------------
|
|
52
|
+
fp32 copy 100MB: 0.9216 ms -> 227.6 GB/s (83.7% of 272 GB/s spec)
|
|
53
|
+
fp64 copy 100MB: 0.9185 ms -> 228.3 GB/s (83.9% of 272 GB/s spec)
|
|
54
|
+
fp64/fp32 copy ratio: 1.00x
|
|
55
|
+
-> Memory-bound: fp64 copy is fast -> bottleneck is COMPUTE, not BW
|
|
56
|
+
(RTX 4060 fp64 compute = 0.25 TFLOPS = 1/32 of fp32)
|
|
57
|
+
|
|
58
|
+
-- Test 5: fp32 drop-in accuracy ------------------------------------
|
|
59
|
+
fp64 batch K=16: 868.690 ms (reference)
|
|
60
|
+
fp32 batch K=16: 272.758 ms speedup=3.18x
|
|
61
|
+
fp32 accuracy: max |err%|=0.0001% mean=0.0000%
|
|
62
|
+
fp32 on fp64 data accuracy: max |err%|=0.0000% mean=0.0000%
|
|
63
|
+
fp32 PASS (<0.1%): YES
|
|
64
|
+
|
|
65
|
+
-- Practical Recommendation -----------------------------------------
|
|
66
|
+
RTX 4060 Laptop fp64 TFLOPS = 0.25 TFLOPS (1/32 of 8 TFLOPS fp32).
|
|
67
|
+
The irfft inner loop in mode_count_from_C / mode_count_K_batch
|
|
68
|
+
is executed in fp64 (complex128) for numerical correctness.
|
|
69
|
+
On RTX 4060 this gives ~30x compute penalty per irfft vs fp32.
|
|
70
|
+
|
|
71
|
+
fp32 forward_batched is accurate to <0.1% -- ACCEPTABLE for training.
|
|
72
|
+
RECOMMENDATION: Use fp32 internally for CUDA training (fft_dtype=float32)
|
|
73
|
+
and only verify final mode count in fp64 (C_mc separate compute).
|
|
74
|
+
This is already the design of DCBLayer (fft_dtype=float32 default)
|
|
75
|
+
but forward_batched up-casts C_batch to complex128 for mode counting.
|
|
76
|
+
A CUDA-fp32 mode counting path (with 1e-6 relative threshold) could
|
|
77
|
+
recover the 30x penalty while staying within <0.1% accuracy.
|
|
78
|
+
|
|
79
|
+
======================================================================
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
n,K,device,t_serial_ms,t_batch_ms,speedup
|
|
2
|
+
50000,1,cuda,238.132,116.65,2.041
|
|
3
|
+
50000,4,cuda,979.639,318.312,3.078
|
|
4
|
+
50000,8,cuda,2035.184,550.501,3.697
|
|
5
|
+
50000,16,cuda,4050.137,1037.984,3.902
|
|
6
|
+
50000,32,cuda,7676.015,2268.065,3.384
|
|
7
|
+
50000,64,cuda,15506.934,4283.204,3.62
|
|
8
|
+
100000,1,cuda,198.963,115.238,1.727
|
|
9
|
+
100000,4,cuda,761.1,305.93,2.488
|
|
10
|
+
100000,8,cuda,1477.925,553.355,2.671
|
|
11
|
+
100000,16,cuda,2940.617,1048.924,2.803
|
|
12
|
+
100000,32,cuda,5840.391,2175.663,2.684
|
|
13
|
+
100000,64,cuda,11846.297,4287.322,2.763
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
Device: cuda
|
|
2
|
+
GPU: NVIDIA GeForce RTX 4060 Laptop GPU
|
|
3
|
+
|
|
4
|
+
n= 50000 K= 1 | serial= 238.13ms batch(C1)= 116.65ms speedup= 2.04x
|
|
5
|
+
n= 50000 K= 4 | serial= 979.64ms batch(C1)= 318.31ms speedup= 3.08x
|
|
6
|
+
n= 50000 K= 8 | serial= 2035.18ms batch(C1)= 550.50ms speedup= 3.70x
|
|
7
|
+
n= 50000 K= 16 | serial= 4050.14ms batch(C1)= 1037.98ms speedup= 3.90x
|
|
8
|
+
n= 50000 K= 32 | serial= 7676.02ms batch(C1)= 2268.06ms speedup= 3.38x
|
|
9
|
+
n= 50000 K= 64 | serial=15506.93ms batch(C1)= 4283.20ms speedup= 3.62x
|
|
10
|
+
n= 100000 K= 1 | serial= 198.96ms batch(C1)= 115.24ms speedup= 1.73x
|
|
11
|
+
n= 100000 K= 4 | serial= 761.10ms batch(C1)= 305.93ms speedup= 2.49x
|
|
12
|
+
n= 100000 K= 8 | serial= 1477.93ms batch(C1)= 553.35ms speedup= 2.67x
|
|
13
|
+
n= 100000 K= 16 | serial= 2940.62ms batch(C1)= 1048.92ms speedup= 2.80x
|
|
14
|
+
n= 100000 K= 32 | serial= 5840.39ms batch(C1)= 2175.66ms speedup= 2.68x
|
|
15
|
+
n= 100000 K= 64 | serial=11846.30ms batch(C1)= 4287.32ms speedup= 2.76x
|
|
16
|
+
|
|
17
|
+
CSV: results/round43_c1_benchmark.csv
|
|
18
|
+
Round 43 C1 Benchmark �� forward vs forward_batched (vectorised _refine_hcrit)
|
|
19
|
+
Device: cuda (NVIDIA GeForce RTX 4060 Laptop GPU)
|
|
20
|
+
Warmup=2, best-of-5
|
|
21
|
+
|
|
22
|
+
n K serial_ms batch_ms speedup
|
|
23
|
+
----------------------------------------------------
|
|
24
|
+
50000 1 238.13 116.65 2.04x
|
|
25
|
+
50000 4 979.64 318.31 3.08x
|
|
26
|
+
50000 8 2035.18 550.50 3.70x
|
|
27
|
+
50000 16 4050.14 1037.98 3.90x
|
|
28
|
+
50000 32 7676.02 2268.07 3.38x
|
|
29
|
+
50000 64 15506.93 4283.20 3.62x
|
|
30
|
+
100000 1 198.96 115.24 1.73x
|
|
31
|
+
100000 4 761.10 305.93 2.49x
|
|
32
|
+
100000 8 1477.92 553.36 2.67x
|
|
33
|
+
100000 16 2940.62 1048.92 2.80x
|
|
34
|
+
100000 32 5840.39 2175.66 2.68x
|
|
35
|
+
100000 64 11846.30 4287.32 2.76x
|
|
36
|
+
|
|
37
|
+
Summary: results/round43_c1_summary.txt
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
Round 43 C1 Benchmark �� forward vs forward_batched (vectorised _refine_hcrit)
|
|
2
|
+
Device: cuda (NVIDIA GeForce RTX 4060 Laptop GPU)
|
|
3
|
+
Warmup=2, best-of-5
|
|
4
|
+
|
|
5
|
+
n K serial_ms batch_ms speedup
|
|
6
|
+
----------------------------------------------------
|
|
7
|
+
50000 1 238.13 116.65 2.04x
|
|
8
|
+
50000 4 979.64 318.31 3.08x
|
|
9
|
+
50000 8 2035.18 550.50 3.70x
|
|
10
|
+
50000 16 4050.14 1037.98 3.90x
|
|
11
|
+
50000 32 7676.02 2268.07 3.38x
|
|
12
|
+
50000 64 15506.93 4283.20 3.62x
|
|
13
|
+
100000 1 198.96 115.24 1.73x
|
|
14
|
+
100000 4 761.10 305.93 2.49x
|
|
15
|
+
100000 8 1477.92 553.36 2.67x
|
|
16
|
+
100000 16 2940.62 1048.92 2.80x
|
|
17
|
+
100000 32 5840.39 2175.66 2.68x
|
|
18
|
+
100000 64 11846.30 4287.32 2.76x
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
dist n K seed | h_single h_batch rel_err% PASS
|
|
2
|
+
--------------------------------------------------------------------------
|
|
3
|
+
bimodal 1000 1 0 | 1.756220 1.756220 0.0000 PASS
|
|
4
|
+
bimodal 1000 4 0 | 1.756220 1.756220 0.0000 PASS
|
|
5
|
+
bimodal 1000 8 0 | 1.756220 1.756220 0.0000 PASS
|
|
6
|
+
bimodal 1000 16 0 | 1.756220 1.756220 0.0000 PASS
|
|
7
|
+
bimodal 1000 32 0 | 1.756220 1.756220 0.0000 PASS
|
|
8
|
+
bimodal 1000 1 1 | 1.716072 1.716072 0.0000 PASS
|
|
9
|
+
bimodal 1000 4 1 | 1.716072 1.716072 0.0000 PASS
|
|
10
|
+
bimodal 1000 8 1 | 1.716072 1.716072 0.0000 PASS
|
|
11
|
+
bimodal 1000 16 1 | 1.716072 1.716072 0.0000 PASS
|
|
12
|
+
bimodal 1000 32 1 | 1.716072 1.716072 0.0000 PASS
|
|
13
|
+
bimodal 1000 1 2 | 1.827619 1.827619 0.0000 PASS
|
|
14
|
+
bimodal 1000 4 2 | 1.827619 1.827619 0.0000 PASS
|
|
15
|
+
bimodal 1000 8 2 | 1.827619 1.827619 0.0000 PASS
|
|
16
|
+
bimodal 1000 16 2 | 1.827619 1.827619 0.0000 PASS
|
|
17
|
+
bimodal 1000 32 2 | 1.827619 1.827619 0.0000 PASS
|
|
18
|
+
bimodal 10000 1 0 | 1.834665 1.834665 0.0000 PASS
|
|
19
|
+
bimodal 10000 4 0 | 1.834665 1.834665 0.0000 PASS
|
|
20
|
+
bimodal 10000 8 0 | 1.834665 1.834665 0.0000 PASS
|
|
21
|
+
bimodal 10000 16 0 | 1.834665 1.834665 0.0000 PASS
|
|
22
|
+
bimodal 10000 32 0 | 1.834665 1.834665 0.0000 PASS
|
|
23
|
+
bimodal 10000 1 1 | 1.835204 1.835204 0.0000 PASS
|
|
24
|
+
bimodal 10000 4 1 | 1.835204 1.835204 0.0000 PASS
|
|
25
|
+
bimodal 10000 8 1 | 1.835204 1.835204 0.0000 PASS
|
|
26
|
+
bimodal 10000 16 1 | 1.835204 1.835204 0.0000 PASS
|
|
27
|
+
bimodal 10000 32 1 | 1.835204 1.835204 0.0000 PASS
|
|
28
|
+
bimodal 10000 1 2 | 1.827390 1.827390 0.0000 PASS
|
|
29
|
+
bimodal 10000 4 2 | 1.827390 1.827390 0.0000 PASS
|
|
30
|
+
bimodal 10000 8 2 | 1.827390 1.827390 0.0000 PASS
|
|
31
|
+
bimodal 10000 16 2 | 1.827390 1.827390 0.0000 PASS
|
|
32
|
+
bimodal 10000 32 2 | 1.827390 1.827390 0.0000 PASS
|
|
33
|
+
bimodal 50000 1 0 | 1.808084 1.808088 0.0002 PASS
|
|
34
|
+
bimodal 50000 4 0 | 1.808084 1.808088 0.0002 PASS
|
|
35
|
+
bimodal 50000 8 0 | 1.808084 1.808088 0.0002 PASS
|
|
36
|
+
bimodal 50000 16 0 | 1.808084 1.808088 0.0002 PASS
|
|
37
|
+
bimodal 50000 32 0 | 1.808084 1.808088 0.0002 PASS
|
|
38
|
+
bimodal 50000 1 1 | 1.828867 1.828869 0.0001 PASS
|
|
39
|
+
bimodal 50000 4 1 | 1.828867 1.828869 0.0001 PASS
|
|
40
|
+
bimodal 50000 8 1 | 1.828867 1.828869 0.0001 PASS
|
|
41
|
+
bimodal 50000 16 1 | 1.828867 1.828869 0.0001 PASS
|
|
42
|
+
bimodal 50000 32 1 | 1.828867 1.828869 0.0001 PASS
|
|
43
|
+
bimodal 50000 1 2 | 1.812422 1.812425 0.0002 PASS
|
|
44
|
+
bimodal 50000 4 2 | 1.812422 1.812425 0.0002 PASS
|
|
45
|
+
bimodal 50000 8 2 | 1.812422 1.812425 0.0002 PASS
|
|
46
|
+
bimodal 50000 16 2 | 1.812422 1.812425 0.0002 PASS
|
|
47
|
+
bimodal 50000 32 2 | 1.812422 1.812425 0.0002 PASS
|
|
48
|
+
bimodal 100000 1 0 | 1.825266 1.825258 0.0004 PASS
|
|
49
|
+
bimodal 100000 4 0 | 1.825266 1.825258 0.0004 PASS
|
|
50
|
+
bimodal 100000 8 0 | 1.825266 1.825258 0.0004 PASS
|
|
51
|
+
bimodal 100000 16 0 | 1.825266 1.825258 0.0004 PASS
|
|
52
|
+
bimodal 100000 32 0 | 1.825266 1.825258 0.0004 PASS
|
|
53
|
+
bimodal 100000 1 1 | 1.833408 1.833405 0.0001 PASS
|
|
54
|
+
bimodal 100000 4 1 | 1.833408 1.833405 0.0001 PASS
|
|
55
|
+
bimodal 100000 8 1 | 1.833408 1.833405 0.0001 PASS
|
|
56
|
+
bimodal 100000 16 1 | 1.833408 1.833405 0.0001 PASS
|
|
57
|
+
bimodal 100000 32 1 | 1.833408 1.833405 0.0001 PASS
|
|
58
|
+
bimodal 100000 1 2 | 1.820311 1.820317 0.0003 PASS
|
|
59
|
+
bimodal 100000 4 2 | 1.820311 1.820317 0.0003 PASS
|
|
60
|
+
bimodal 100000 8 2 | 1.820311 1.820317 0.0003 PASS
|
|
61
|
+
bimodal 100000 16 2 | 1.820311 1.820317 0.0003 PASS
|
|
62
|
+
bimodal 100000 32 2 | 1.820311 1.820317 0.0003 PASS
|
|
63
|
+
gaussian 1000 1 0 | 0.314169 0.314169 0.0000 PASS
|
|
64
|
+
gaussian 1000 4 0 | 0.314169 0.314169 0.0000 PASS
|
|
65
|
+
gaussian 1000 8 0 | 0.314169 0.314169 0.0000 PASS
|
|
66
|
+
gaussian 1000 16 0 | 0.314169 0.314169 0.0000 PASS
|
|
67
|
+
gaussian 1000 32 0 | 0.314169 0.314169 0.0000 PASS
|
|
68
|
+
gaussian 1000 1 1 | 0.278207 0.278207 0.0000 PASS
|
|
69
|
+
gaussian 1000 4 1 | 0.278207 0.278207 0.0000 PASS
|
|
70
|
+
gaussian 1000 8 1 | 0.278207 0.278207 0.0000 PASS
|
|
71
|
+
gaussian 1000 16 1 | 0.278207 0.278207 0.0000 PASS
|
|
72
|
+
gaussian 1000 32 1 | 0.278207 0.278207 0.0000 PASS
|
|
73
|
+
gaussian 1000 1 2 | 0.244192 0.244192 0.0000 PASS
|
|
74
|
+
gaussian 1000 4 2 | 0.244192 0.244192 0.0000 PASS
|
|
75
|
+
gaussian 1000 8 2 | 0.244192 0.244192 0.0000 PASS
|
|
76
|
+
gaussian 1000 16 2 | 0.244192 0.244192 0.0000 PASS
|
|
77
|
+
gaussian 1000 32 2 | 0.244192 0.244192 0.0000 PASS
|
|
78
|
+
gaussian 10000 1 0 | 0.169495 0.169495 0.0000 PASS
|
|
79
|
+
gaussian 10000 4 0 | 0.169495 0.169495 0.0000 PASS
|
|
80
|
+
gaussian 10000 8 0 | 0.169495 0.169495 0.0000 PASS
|
|
81
|
+
gaussian 10000 16 0 | 0.169495 0.169495 0.0000 PASS
|
|
82
|
+
gaussian 10000 32 0 | 0.169495 0.169495 0.0000 PASS
|
|
83
|
+
gaussian 10000 1 1 | 0.123838 0.123838 0.0000 PASS
|
|
84
|
+
gaussian 10000 4 1 | 0.123838 0.123838 0.0000 PASS
|
|
85
|
+
gaussian 10000 8 1 | 0.123838 0.123838 0.0000 PASS
|
|
86
|
+
gaussian 10000 16 1 | 0.123838 0.123838 0.0000 PASS
|
|
87
|
+
gaussian 10000 32 1 | 0.123838 0.123838 0.0000 PASS
|
|
88
|
+
gaussian 10000 1 2 | 0.142834 0.142834 0.0000 PASS
|
|
89
|
+
gaussian 10000 4 2 | 0.142834 0.142834 0.0000 PASS
|
|
90
|
+
gaussian 10000 8 2 | 0.142834 0.142834 0.0000 PASS
|
|
91
|
+
gaussian 10000 16 2 | 0.142834 0.142834 0.0000 PASS
|
|
92
|
+
gaussian 10000 32 2 | 0.142834 0.142834 0.0000 PASS
|
|
93
|
+
gaussian 50000 1 0 | 0.246755 0.246772 0.0068 PASS
|
|
94
|
+
gaussian 50000 4 0 | 0.246755 0.246772 0.0068 PASS
|
|
95
|
+
gaussian 50000 8 0 | 0.246755 0.246772 0.0068 PASS
|
|
96
|
+
gaussian 50000 16 0 | 0.246755 0.246772 0.0068 PASS
|
|
97
|
+
gaussian 50000 32 0 | 0.246755 0.246772 0.0068 PASS
|
|
98
|
+
gaussian 50000 1 1 | 0.149850 0.149896 0.0306 PASS
|
|
99
|
+
gaussian 50000 4 1 | 0.149850 0.149896 0.0306 PASS
|
|
100
|
+
gaussian 50000 8 1 | 0.149850 0.149896 0.0306 PASS
|
|
101
|
+
gaussian 50000 16 1 | 0.149850 0.149896 0.0306 PASS
|
|
102
|
+
gaussian 50000 32 1 | 0.149850 0.149896 0.0306 PASS
|
|
103
|
+
gaussian 50000 1 2 | 0.121115 0.121048 0.0556 PASS
|
|
104
|
+
gaussian 50000 4 2 | 0.121115 0.121048 0.0556 PASS
|
|
105
|
+
gaussian 50000 8 2 | 0.121115 0.121048 0.0556 PASS
|
|
106
|
+
gaussian 50000 16 2 | 0.121115 0.121048 0.0556 PASS
|
|
107
|
+
gaussian 50000 32 2 | 0.121115 0.121048 0.0556 PASS
|
|
108
|
+
gaussian 100000 1 0 | 0.221107 0.221059 0.0216 PASS
|
|
109
|
+
gaussian 100000 4 0 | 0.221107 0.221059 0.0216 PASS
|
|
110
|
+
gaussian 100000 8 0 | 0.221107 0.221059 0.0216 PASS
|
|
111
|
+
gaussian 100000 16 0 | 0.221107 0.221059 0.0216 PASS
|
|
112
|
+
gaussian 100000 32 0 | 0.221107 0.221059 0.0216 PASS
|
|
113
|
+
gaussian 100000 1 1 | 0.110631 0.110631 0.0000 PASS
|
|
114
|
+
gaussian 100000 4 1 | 0.110631 0.110631 0.0000 PASS
|
|
115
|
+
gaussian 100000 8 1 | 0.110631 0.110631 0.0000 PASS
|
|
116
|
+
gaussian 100000 16 1 | 0.110631 0.110631 0.0000 PASS
|
|
117
|
+
gaussian 100000 32 1 | 0.110631 0.110631 0.0000 PASS
|
|
118
|
+
gaussian 100000 1 2 | 0.284689 0.284646 0.0150 PASS
|
|
119
|
+
gaussian 100000 4 2 | 0.284689 0.284646 0.0150 PASS
|
|
120
|
+
gaussian 100000 8 2 | 0.284689 0.284646 0.0150 PASS
|
|
121
|
+
gaussian 100000 16 2 | 0.284689 0.284646 0.0150 PASS
|
|
122
|
+
gaussian 100000 32 2 | 0.284689 0.284646 0.0150 PASS
|
|
123
|
+
|
|
124
|
+
ALL CELLS PASSED (120 cells, tol=0.1%)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
n,K,device,batched_min_ms,batched_mean_ms,sequential_min_ms,sequential_mean_ms,speedup_min,speedup_mean
|
|
2
|
+
1000,1,cpu,85.72,96.11,81.23,88.52,0.948,0.921
|
|
3
|
+
1000,2,cpu,164.69,178.75,186.52,200.78,1.133,1.123
|
|
4
|
+
1000,4,cpu,337.49,486.25,359.4,396.35,1.065,0.815
|
|
5
|
+
1000,8,cpu,683.1,718.5,758.21,770.42,1.11,1.072
|
|
6
|
+
1000,16,cpu,1452.8,1548.19,1561.97,1597.4,1.075,1.032
|
|
7
|
+
50000,1,cpu,968.08,988.68,1723.52,1945.68,1.78,1.968
|
|
8
|
+
50000,2,cpu,1939.14,1965.48,3261.56,4119.5,1.682,2.096
|
|
9
|
+
50000,4,cpu,3493.4,3742.31,6772.61,7883.17,1.939,2.107
|
|
10
|
+
50000,8,cpu,7558.26,7868.59,13422.82,13693.85,1.776,1.74
|
|
11
|
+
50000,16,cpu,14008.71,15191.58,29186.0,29992.16,2.083,1.974
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
n,K,device,batched_min_ms,batched_mean_ms,sequential_min_ms,sequential_mean_ms,speedup_min,speedup_mean
|
|
2
|
+
1000,1,cuda,16.51,200.03,284.35,341.52,17.221,1.707
|
|
3
|
+
1000,2,cuda,405.14,461.78,623.17,768.84,1.538,1.665
|
|
4
|
+
1000,4,cuda,389.6,655.61,393.17,408.28,1.009,0.623
|
|
5
|
+
1000,8,cuda,726.44,788.72,781.72,868.58,1.076,1.101
|
|
6
|
+
1000,16,cuda,1499.95,1533.1,1534.83,1562.35,1.023,1.019
|
|
7
|
+
50000,1,cuda,134.6,141.92,241.63,253.91,1.795,1.789
|
|
8
|
+
50000,2,cuda,207.84,210.4,456.98,491.81,2.199,2.338
|
|
9
|
+
50000,4,cuda,363.56,364.94,902.96,966.07,2.484,2.647
|
|
10
|
+
50000,8,cuda,669.32,677.79,1911.62,2006.5,2.856,2.96
|
|
11
|
+
50000,16,cuda,1303.99,1313.56,3915.4,3993.36,3.003,3.04
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
HPC-B5 Training Throughput Benchmark
|
|
2
|
+
Device: cpu PyTorch: 2.12.0
|
|
3
|
+
Warmup runs: 3 Timed runs: 5 Metric: best-of-5
|
|
4
|
+
|
|
5
|
+
n=1000
|
|
6
|
+
K batched(ms) sequential(ms) speedup
|
|
7
|
+
K= 1 85.7 81.2 0.95x
|
|
8
|
+
K= 2 164.7 186.5 1.13x
|
|
9
|
+
K= 4 337.5 359.4 1.06x
|
|
10
|
+
K= 8 683.1 758.2 1.11x
|
|
11
|
+
K=16 1452.8 1562.0 1.07x
|
|
12
|
+
|
|
13
|
+
n=50000
|
|
14
|
+
K batched(ms) sequential(ms) speedup
|
|
15
|
+
K= 1 968.1 1723.5 1.78x
|
|
16
|
+
K= 2 1939.1 3261.6 1.68x
|
|
17
|
+
K= 4 3493.4 6772.6 1.94x
|
|
18
|
+
K= 8 7558.3 13422.8 1.78x
|
|
19
|
+
K=16 14008.7 29186.0 2.08x
|
|
20
|
+
|
|
21
|
+
Key result (n=50K, best-of speedup over K sequential backward calls):
|
|
22
|
+
K= 1: 1.78x
|
|
23
|
+
K= 2: 1.68x
|
|
24
|
+
K= 4: 1.94x
|
|
25
|
+
K= 8: 1.78x
|
|
26
|
+
K=16: 2.08x
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
HPC-B5 Training Throughput Benchmark
|
|
2
|
+
Device: cuda PyTorch: 2.5.1+cu121
|
|
3
|
+
Warmup runs: 3 Timed runs: 5 Metric: best-of-5
|
|
4
|
+
|
|
5
|
+
n=1000
|
|
6
|
+
K batched(ms) sequential(ms) speedup
|
|
7
|
+
K= 1 16.5 284.4 17.22x
|
|
8
|
+
K= 2 405.1 623.2 1.54x
|
|
9
|
+
K= 4 389.6 393.2 1.01x
|
|
10
|
+
K= 8 726.4 781.7 1.08x
|
|
11
|
+
K=16 1500.0 1534.8 1.02x
|
|
12
|
+
|
|
13
|
+
n=50000
|
|
14
|
+
K batched(ms) sequential(ms) speedup
|
|
15
|
+
K= 1 134.6 241.6 1.79x
|
|
16
|
+
K= 2 207.8 457.0 2.20x
|
|
17
|
+
K= 4 363.6 903.0 2.48x
|
|
18
|
+
K= 8 669.3 1911.6 2.86x
|
|
19
|
+
K=16 1304.0 3915.4 3.00x
|
|
20
|
+
|
|
21
|
+
Key result (n=50K, best-of speedup over K sequential backward calls):
|
|
22
|
+
K= 1: 1.79x
|
|
23
|
+
K= 2: 2.20x
|
|
24
|
+
K= 4: 2.48x
|
|
25
|
+
K= 8: 2.86x
|
|
26
|
+
K=16: 3.00x
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
D:\Anaconda3\lib\site-packages\torch\autograd\function.py:307: UserWarning: DCB IFT denominator |\u2202M\u0303/\u2202h|=0.00e+00 < 0.01. Gradient may be large. Use safe_backward=True to clamp.
|
|
2
|
+
return user_fn(self, *args)
|
|
3
|
+
D:\Anaconda3\lib\site-packages\torch\autograd\function.py:307: UserWarning: DCB IFT denominator |\u2202M\u0303/\u2202h|=4.47e-04 < 0.01. Gradient may be large. Use safe_backward=True to clamp.
|
|
4
|
+
return user_fn(self, *args)
|
|
5
|
+
D:\Anaconda3\lib\site-packages\torch\autograd\function.py:307: UserWarning: DCB IFT denominator |\u2202M\u0303/\u2202h|=1.12e-04 < 0.01. Gradient may be large. Use safe_backward=True to clamp.
|
|
6
|
+
return user_fn(self, *args)
|
|
7
|
+
D:\Anaconda3\lib\site-packages\torch\autograd\function.py:307: UserWarning: DCB IFT denominator |\u2202M\u0303/\u2202h|=2.24e-04 < 0.01. Gradient may be large. Use safe_backward=True to clamp.
|
|
8
|
+
return user_fn(self, *args)
|
|
9
|
+
D:\Anaconda3\lib\site-packages\torch\autograd\function.py:307: UserWarning: DCB IFT denominator |\u2202M\u0303/\u2202h|=1.13e-04 < 0.01. Gradient may be large. Use safe_backward=True to clamp.
|
|
10
|
+
return user_fn(self, *args)
|
|
11
|
+
D:\Anaconda3\lib\site-packages\torch\autograd\function.py:307: UserWarning: DCB IFT denominator |\u2202M\u0303/\u2202h|=2.26e-04 < 0.01. Gradient may be large. Use safe_backward=True to clamp.
|
|
12
|
+
return user_fn(self, *args)
|
|
13
|
+
D:\Anaconda3\lib\site-packages\torch\autograd\function.py:307: UserWarning: DCB IFT denominator |\u2202M\u0303/\u2202h|=1.10e-04 < 0.01. Gradient may be large. Use safe_backward=True to clamp.
|
|
14
|
+
return user_fn(self, *args)
|
|
15
|
+
D:\Anaconda3\lib\site-packages\torch\autograd\function.py:307: UserWarning: DCB IFT denominator |\u2202M\u0303/\u2202h|=2.23e-04 < 0.01. Gradient may be large. Use safe_backward=True to clamp.
|
|
16
|
+
return user_fn(self, *args)
|
|
17
|
+
D:\Anaconda3\lib\site-packages\torch\autograd\function.py:307: UserWarning: DCB IFT denominator |\u2202M\u0303/\u2202h|=2.20e-04 < 0.01. Gradient may be large. Use safe_backward=True to clamp.
|
|
18
|
+
return user_fn(self, *args)
|
|
19
|
+
D:\Anaconda3\lib\site-packages\torch\autograd\function.py:307: UserWarning: DCB IFT denominator |\u2202M\u0303/\u2202h|=4.79e-04 < 0.01. Gradient may be large. Use safe_backward=True to clamp.
|
|
20
|
+
return user_fn(self, *args)
|
|
21
|
+
D:\Anaconda3\lib\site-packages\torch\autograd\function.py:307: UserWarning: DCB IFT denominator |\u2202M\u0303/\u2202h|=3.40e-04 < 0.01. Gradient may be large. Use safe_backward=True to clamp.
|
|
22
|
+
return user_fn(self, *args)
|
|
23
|
+
D:\Anaconda3\lib\site-packages\torch\autograd\function.py:307: UserWarning: DCB IFT denominator |\u2202M\u0303/\u2202h|=2.25e-04 < 0.01. Gradient may be large. Use safe_backward=True to clamp.
|
|
24
|
+
return user_fn(self, *args)
|
|
25
|
+
D:\Anaconda3\lib\site-packages\torch\autograd\function.py:307: UserWarning: DCB IFT denominator |\u2202M\u0303/\u2202h|=2.21e-04 < 0.01. Gradient may be large. Use safe_backward=True to clamp.
|
|
26
|
+
return user_fn(self, *args)
|
|
27
|
+
D:\Anaconda3\lib\site-packages\torch\autograd\function.py:307: UserWarning: DCB IFT denominator |\u2202M\u0303/\u2202h|=4.55e-04 < 0.01. Gradient may be large. Use safe_backward=True to clamp.
|
|
28
|
+
return user_fn(self, *args)
|
|
29
|
+
D:\Anaconda3\lib\site-packages\torch\autograd\function.py:307: UserWarning: DCB IFT denominator |\u2202M\u0303/\u2202h|=1.15e-04 < 0.01. Gradient may be large. Use safe_backward=True to clamp.
|
|
30
|
+
return user_fn(self, *args)
|
|
31
|
+
D:\Anaconda3\lib\site-packages\torch\autograd\function.py:307: UserWarning: DCB IFT denominator |\u2202M\u0303/\u2202h|=2.18e-04 < 0.01. Gradient may be large. Use safe_backward=True to clamp.
|
|
32
|
+
return user_fn(self, *args)
|
|
33
|
+
D:\Anaconda3\lib\site-packages\torch\autograd\function.py:307: UserWarning: DCB IFT denominator |\u2202M\u0303/\u2202h|=2.22e-04 < 0.01. Gradient may be large. Use safe_backward=True to clamp.
|
|
34
|
+
return user_fn(self, *args)
|
|
35
|
+
D:\Anaconda3\lib\site-packages\torch\autograd\function.py:307: UserWarning: DCB IFT denominator |\u2202M\u0303/\u2202h|=2.32e-04 < 0.01. Gradient may be large. Use safe_backward=True to clamp.
|
|
36
|
+
return user_fn(self, *args)
|
|
37
|
+
D:\Anaconda3\lib\site-packages\torch\autograd\function.py:307: UserWarning: DCB IFT denominator |\u2202M\u0303/\u2202h|=1.16e-04 < 0.01. Gradient may be large. Use safe_backward=True to clamp.
|
|
38
|
+
return user_fn(self, *args)
|
|
39
|
+
D:\Anaconda3\lib\site-packages\torch\autograd\function.py:307: UserWarning: DCB IFT denominator |\u2202M\u0303/\u2202h|=3.25e-04 < 0.01. Gradient may be large. Use safe_backward=True to clamp.
|
|
40
|
+
return user_fn(self, *args)
|
|
41
|
+
D:\Anaconda3\lib\site-packages\torch\autograd\function.py:307: UserWarning: DCB IFT denominator |\u2202M\u0303/\u2202h|=1.08e-04 < 0.01. Gradient may be large. Use safe_backward=True to clamp.
|
|
42
|
+
return user_fn(self, *args)
|
|
43
|
+
D:\Anaconda3\lib\site-packages\torch\autograd\function.py:307: UserWarning: DCB IFT denominator |\u2202M\u0303/\u2202h|=3.45e-04 < 0.01. Gradient may be large. Use safe_backward=True to clamp.
|
|
44
|
+
return user_fn(self, *args)
|
|
45
|
+
D:\Anaconda3\lib\site-packages\torch\autograd\function.py:307: UserWarning: DCB IFT denominator |\u2202M\u0303/\u2202h|=1.17e-04 < 0.01. Gradient may be large. Use safe_backward=True to clamp.
|
|
46
|
+
return user_fn(self, *args)
|
|
47
|
+
D:\Anaconda3\lib\site-packages\torch\autograd\function.py:307: UserWarning: DCB IFT denominator |\u2202M\u0303/\u2202h|=3.52e-04 < 0.01. Gradient may be large. Use safe_backward=True to clamp.
|
|
48
|
+
return user_fn(self, *args)
|
|
49
|
+
D:\Anaconda3\lib\site-packages\torch\autograd\function.py:307: UserWarning: DCB IFT denominator |\u2202M\u0303/\u2202h|=4.74e-04 < 0.01. Gradient may be large. Use safe_backward=True to clamp.
|
|
50
|
+
return user_fn(self, *args)
|
|
51
|
+
D:\Anaconda3\lib\site-packages\torch\autograd\function.py:307: UserWarning: DCB IFT denominator |\u2202M\u0303/\u2202h|=2.28e-04 < 0.01. Gradient may be large. Use safe_backward=True to clamp.
|
|
52
|
+
return user_fn(self, *args)
|
|
53
|
+
D:\Anaconda3\lib\site-packages\torch\autograd\function.py:307: UserWarning: DCB IFT denominator |\u2202M\u0303/\u2202h|=2.27e-04 < 0.01. Gradient may be large. Use safe_backward=True to clamp.
|
|
54
|
+
return user_fn(self, *args)
|
|
55
|
+
D:\Anaconda3\lib\site-packages\torch\autograd\function.py:307: UserWarning: DCB IFT denominator |\u2202M\u0303/\u2202h|=2.31e-04 < 0.01. Gradient may be large. Use safe_backward=True to clamp.
|
|
56
|
+
return user_fn(self, *args)
|
|
57
|
+
D:\Anaconda3\lib\site-packages\torch\autograd\function.py:307: UserWarning: DCB IFT denominator |\u2202M\u0303/\u2202h|=1.07e-04 < 0.01. Gradient may be large. Use safe_backward=True to clamp.
|
|
58
|
+
return user_fn(self, *args)
|
|
59
|
+
D:\Anaconda3\lib\site-packages\torch\autograd\function.py:307: UserWarning: DCB IFT denominator |\u2202M\u0303/\u2202h|=2.17e-04 < 0.01. Gradient may be large. Use safe_backward=True to clamp.
|
|
60
|
+
return user_fn(self, *args)
|
|
61
|
+
D:\Anaconda3\lib\site-packages\torch\autograd\function.py:307: UserWarning: DCB IFT denominator |\u2202M\u0303/\u2202h|=3.44e-04 < 0.01. Gradient may be large. Use safe_backward=True to clamp.
|
|
62
|
+
return user_fn(self, *args)
|
|
63
|
+
D:\Anaconda3\lib\site-packages\torch\autograd\function.py:307: UserWarning: DCB IFT denominator |\u2202M\u0303/\u2202h|=2.30e-04 < 0.01. Gradient may be large. Use safe_backward=True to clamp.
|
|
64
|
+
return user_fn(self, *args)
|
|
65
|
+
D:\Anaconda3\lib\site-packages\torch\autograd\function.py:307: UserWarning: DCB IFT denominator |\u2202M\u0303/\u2202h|=4.70e-04 < 0.01. Gradient may be large. Use safe_backward=True to clamp.
|
|
66
|
+
return user_fn(self, *args)
|
|
67
|
+
D:\Anaconda3\lib\site-packages\torch\autograd\function.py:307: UserWarning: DCB IFT denominator |\u2202M\u0303/\u2202h|=2.29e-04 < 0.01. Gradient may be large. Use safe_backward=True to clamp.
|
|
68
|
+
return user_fn(self, *args)
|
|
69
|
+
D:\Anaconda3\lib\site-packages\torch\autograd\function.py:307: UserWarning: DCB IFT denominator |\u2202M\u0303/\u2202h|=3.23e-04 < 0.01. Gradient may be large. Use safe_backward=True to clamp.
|
|
70
|
+
return user_fn(self, *args)
|
|
71
|
+
D:\Anaconda3\lib\site-packages\torch\autograd\function.py:307: UserWarning: DCB IFT denominator |\u2202M\u0303/\u2202h|=2.19e-04 < 0.01. Gradient may be large. Use safe_backward=True to clamp.
|
|
72
|
+
return user_fn(self, *args)
|
|
73
|
+
D:\Anaconda3\lib\site-packages\torch\autograd\function.py:307: UserWarning: DCB IFT denominator |\u2202M\u0303/\u2202h|=1.14e-04 < 0.01. Gradient may be large. Use safe_backward=True to clamp.
|
|
74
|
+
return user_fn(self, *args)
|
|
75
|
+
D:\Anaconda3\lib\site-packages\torch\autograd\function.py:307: UserWarning: DCB IFT denominator |\u2202M\u0303/\u2202h|=3.54e-04 < 0.01. Gradient may be large. Use safe_backward=True to clamp.
|
|
76
|
+
return user_fn(self, *args)
|
|
77
|
+
D:\Anaconda3\lib\site-packages\torch\autograd\function.py:307: UserWarning: DCB IFT denominator |\u2202M\u0303/\u2202h|=2.16e-04 < 0.01. Gradient may be large. Use safe_backward=True to clamp.
|
|
78
|
+
return user_fn(self, *args)
|
|
79
|
+
[B5-bench] Device: cuda
|
|
80
|
+
[B5-bench] PyTorch: 2.5.1+cu121
|
|
81
|
+
|
|
82
|
+
n= 1000 use_fft=False
|
|
83
|
+
K batched_min seq_min speedup
|
|
84
|
+
K= 1 batched= 16.5ms seq= 284.3ms speedup=17.22x
|
|
85
|
+
K= 2 batched= 405.1ms seq= 623.2ms speedup=1.54x
|
|
86
|
+
K= 4 batched= 389.6ms seq= 393.2ms speedup=1.01x
|
|
87
|
+
K= 8 batched= 726.4ms seq= 781.7ms speedup=1.08x
|
|
88
|
+
K=16 batched= 1500.0ms seq= 1534.8ms speedup=1.02x
|
|
89
|
+
|
|
90
|
+
n= 50000 use_fft=True
|
|
91
|
+
K batched_min seq_min speedup
|
|
92
|
+
K= 1 batched= 134.6ms seq= 241.6ms speedup=1.80x
|
|
93
|
+
K= 2 batched= 207.8ms seq= 457.0ms speedup=2.20x
|
|
94
|
+
K= 4 batched= 363.6ms seq= 903.0ms speedup=2.48x
|
|
95
|
+
K= 8 batched= 669.3ms seq= 1911.6ms speedup=2.86x
|
|
96
|
+
K=16 batched= 1304.0ms seq= 3915.4ms speedup=3.00x
|
|
97
|
+
|
|
98
|
+
CSV written: C:\Users\lenovo\dcb_exp\results\round44_b5_benchmark.csv
|
|
99
|
+
Summary written: C:\Users\lenovo\dcb_exp\results\round44_b5_summary.txt
|
|
100
|
+
|
|
101
|
+
[B5-bench] Done.
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
[B5] Device: cuda
|
|
2
|
+
[B5] PyTorch: 2.5.1+cu121
|
|
3
|
+
|
|
4
|
+
============================================================
|
|
5
|
+
PART 1: Forward correctness (forward_batched_grad vs forward_batched)
|
|
6
|
+
============================================================
|
|
7
|
+
[PASS] n= 500 bimodal K=1 seed=0 max_rel=0.000000%
|
|
8
|
+
[PASS] n= 500 bimodal K=1 seed=1 max_rel=0.000000%
|
|
9
|
+
[PASS] n= 500 bimodal K=1 seed=2 max_rel=0.000000%
|
|
10
|
+
[PASS] n= 500 bimodal K=2 seed=0 max_rel=0.000000%
|
|
11
|
+
[PASS] n= 500 bimodal K=2 seed=1 max_rel=0.000007%
|
|
12
|
+
[PASS] n= 500 bimodal K=2 seed=2 max_rel=0.000007%
|
|
13
|
+
[PASS] n= 500 bimodal K=4 seed=0 max_rel=0.000000%
|
|
14
|
+
[PASS] n= 500 bimodal K=4 seed=1 max_rel=0.000022%
|
|
15
|
+
[PASS] n= 500 bimodal K=4 seed=2 max_rel=0.000007%
|
|
16
|
+
[PASS] n= 500 bimodal K=8 seed=0 max_rel=0.000042%
|
|
17
|
+
[PASS] n= 500 bimodal K=8 seed=1 max_rel=0.000027%
|
|
18
|
+
[PASS] n= 500 bimodal K=8 seed=2 max_rel=0.000007%
|
|
19
|
+
[PASS] n= 500 gaussian K=1 seed=0 max_rel=0.000000%
|
|
20
|
+
[PASS] n= 500 gaussian K=1 seed=1 max_rel=0.000000%
|
|
21
|
+
[PASS] n= 500 gaussian K=1 seed=2 max_rel=0.000000%
|
|
22
|
+
[PASS] n= 500 gaussian K=2 seed=0 max_rel=0.000000%
|
|
23
|
+
[PASS] n= 500 gaussian K=2 seed=1 max_rel=0.000000%
|
|
24
|
+
[PASS] n= 500 gaussian K=2 seed=2 max_rel=0.000000%
|
|
25
|
+
[PASS] n= 500 gaussian K=4 seed=0 max_rel=0.000000%
|
|
26
|
+
[PASS] n= 500 gaussian K=4 seed=1 max_rel=0.000000%
|
|
27
|
+
[PASS] n= 500 gaussian K=4 seed=2 max_rel=0.000132%
|
|
28
|
+
[PASS] n= 500 gaussian K=8 seed=0 max_rel=0.000167%
|
|
29
|
+
[PASS] n= 500 gaussian K=8 seed=1 max_rel=0.000204%
|
|
30
|
+
[PASS] n= 500 gaussian K=8 seed=2 max_rel=0.000132%
|
|
31
|
+
[PASS] n= 2000 bimodal K=1 seed=0 max_rel=0.000000%
|
|
32
|
+
[PASS] n= 2000 bimodal K=1 seed=1 max_rel=0.000000%
|
|
33
|
+
[PASS] n= 2000 bimodal K=1 seed=2 max_rel=0.000000%
|
|
34
|
+
[PASS] n= 2000 bimodal K=2 seed=0 max_rel=0.000007%
|
|
35
|
+
[PASS] n= 2000 bimodal K=2 seed=1 max_rel=0.000007%
|
|
36
|
+
[PASS] n= 2000 bimodal K=2 seed=2 max_rel=0.000007%
|
|
37
|
+
[PASS] n= 2000 bimodal K=4 seed=0 max_rel=0.000007%
|
|
38
|
+
[PASS] n= 2000 bimodal K=4 seed=1 max_rel=0.000007%
|
|
39
|
+
[PASS] n= 2000 bimodal K=4 seed=2 max_rel=0.000035%
|
|
40
|
+
[PASS] n= 2000 bimodal K=8 seed=0 max_rel=0.000028%
|
|
41
|
+
[PASS] n= 2000 bimodal K=8 seed=1 max_rel=0.000021%
|
|
42
|
+
[PASS] n= 2000 bimodal K=8 seed=2 max_rel=0.000035%
|
|
43
|
+
[PASS] n= 2000 gaussian K=1 seed=0 max_rel=0.000000%
|
|
44
|
+
[PASS] n= 2000 gaussian K=1 seed=1 max_rel=0.000000%
|
|
45
|
+
[PASS] n= 2000 gaussian K=1 seed=2 max_rel=0.000000%
|
|
46
|
+
[PASS] n= 2000 gaussian K=2 seed=0 max_rel=0.000000%
|
|
47
|
+
[PASS] n= 2000 gaussian K=2 seed=1 max_rel=0.000000%
|
|
48
|
+
[PASS] n= 2000 gaussian K=2 seed=2 max_rel=0.000000%
|
|
49
|
+
[PASS] n= 2000 gaussian K=4 seed=0 max_rel=0.000000%
|
|
50
|
+
[PASS] n= 2000 gaussian K=4 seed=1 max_rel=0.000000%
|
|
51
|
+
[PASS] n= 2000 gaussian K=4 seed=2 max_rel=0.000000%
|
|
52
|
+
[PASS] n= 2000 gaussian K=8 seed=0 max_rel=0.000000%
|
|
53
|
+
[PASS] n= 2000 gaussian K=8 seed=1 max_rel=0.000000%
|
|
54
|
+
[PASS] n= 2000 gaussian K=8 seed=2 max_rel=0.000215%
|
|
55
|
+
|
|
56
|
+
Part 1 RESULT: ALL PASS (forward_batched_grad agrees with forward_batched within 0.1%)
|
|
57
|
+
|
|
58
|
+
============================================================
|
|
59
|
+
PART 2: Gradient correctness �� cosine(IFT grad, FD grad)
|
|
60
|
+
============================================================
|
|
61
|
+
[PASS] K=1 k=0 cosine=0.9994 rel_norm_err=0.0718
|
|
62
|
+
[PASS] K=2 k=0 cosine=0.9994 rel_norm_err=0.0722
|
|
63
|
+
[PASS] K=2 k=1 cosine=0.9994 rel_norm_err=0.0344
|
|
64
|
+
[PASS] K=4 k=0 cosine=0.9994 rel_norm_err=0.0725
|
|
65
|
+
[PASS] K=4 k=1 cosine=0.9994 rel_norm_err=0.0362
|
|
66
|
+
[PASS] K=4 k=2 cosine=0.9997 rel_norm_err=0.0238
|
|
67
|
+
[PASS] K=4 k=3 cosine=0.9992 rel_norm_err=0.1125
|
|
68
|
+
|
|
69
|
+
Part 2 RESULT: ALL PASS (cosine >= 0.9 for all K=1,2,4)
|
|
70
|
+
|
|
71
|
+
============================================================
|
|
72
|
+
PART 3: Smoke test backward on cuda
|
|
73
|
+
============================================================
|
|
74
|
+
K=4, n=1000, device=cuda
|
|
75
|
+
h_crits: [1.6533485651016235, 1.6996427774429321, 1.6819535493850708, 1.6654480695724487]
|
|
76
|
+
forward+backward wall time: 561.1 ms
|
|
77
|
+
[PASS] xs[0].grad norm=0.1055 min=-7.4008e-03 max=3.3091e-03
|
|
78
|
+
[PASS] xs[1].grad norm=0.1763 min=-1.2266e-02 max=5.4856e-03
|
|
79
|
+
[PASS] xs[2].grad norm=0.1174 min=-8.0658e-03 max=3.6058e-03
|
|
80
|
+
[PASS] xs[3].grad norm=0.1089 min=-3.4354e-03 max=7.6481e-03
|
|
81
|
+
|
|
82
|
+
Part 3 RESULT: PASS (backward ran, grads are finite)
|
|
83
|
+
|
|
84
|
+
============================================================
|
|
85
|
+
SUMMARY
|
|
86
|
+
============================================================
|
|
87
|
+
Part 1 (forward correctness): PASS
|
|
88
|
+
Part 2 (gradient cosine): PASS
|
|
89
|
+
Part 3 (smoke backward): PASS
|
|
90
|
+
Min cosine similarity (K=1,2,4): 0.9992
|
|
91
|
+
|
|
92
|
+
OVERALL: ALL PASS
|