M3Drop 0.4.33__py3-none-any.whl → 0.4.34__py3-none-any.whl
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.
- m3Drop/normalizationGPU.py +10 -7
- {m3drop-0.4.33.dist-info → m3drop-0.4.34.dist-info}/METADATA +1 -1
- {m3drop-0.4.33.dist-info → m3drop-0.4.34.dist-info}/RECORD +6 -6
- {m3drop-0.4.33.dist-info → m3drop-0.4.34.dist-info}/WHEEL +0 -0
- {m3drop-0.4.33.dist-info → m3drop-0.4.34.dist-info}/licenses/LICENSE +0 -0
- {m3drop-0.4.33.dist-info → m3drop-0.4.34.dist-info}/top_level.txt +0 -0
m3Drop/normalizationGPU.py
CHANGED
|
@@ -19,14 +19,15 @@ def NBumiPearsonResidualsGPU(
|
|
|
19
19
|
output_filename: str
|
|
20
20
|
):
|
|
21
21
|
"""
|
|
22
|
-
Calculates Pearson residuals. Safe Mode: Multiplier increased to
|
|
22
|
+
Calculates Pearson residuals. Safe Mode: Multiplier increased to 10.0.
|
|
23
23
|
"""
|
|
24
24
|
start_time = time.perf_counter()
|
|
25
25
|
print(f"FUNCTION: NBumiPearsonResiduals() | FILE: {cleaned_filename}")
|
|
26
26
|
|
|
27
27
|
# --- SAFETY UPDATE ---
|
|
28
|
-
# Multiplier
|
|
29
|
-
|
|
28
|
+
# Multiplier 10.0 (Was 6.0): Accounts for Float64 precision (8 bytes) vs Governor default (4 bytes).
|
|
29
|
+
# 4 matrices * 8 bytes = 32 bytes/cell. Governor 10 * 4 = 40 bytes. Safe buffer established.
|
|
30
|
+
chunk_size = get_optimal_chunk_size(cleaned_filename, multiplier=10.0, is_dense=True)
|
|
30
31
|
|
|
31
32
|
# --- Phase 1: Initialization ---
|
|
32
33
|
print("Phase [1/2]: Initializing parameters and preparing output file...")
|
|
@@ -98,7 +99,8 @@ def NBumiPearsonResidualsGPU(
|
|
|
98
99
|
pearson_chunk_gpu = (counts_chunk_dense_gpu - mus_chunk_gpu) / denominator_gpu
|
|
99
100
|
|
|
100
101
|
# Write to Disk
|
|
101
|
-
|
|
102
|
+
# [OPTIMIZATION] Cast to float32 on GPU to halve PCIe transfer time
|
|
103
|
+
out_x[i:end_row, :] = pearson_chunk_gpu.astype(cupy.float32).get()
|
|
102
104
|
|
|
103
105
|
# Cleanup
|
|
104
106
|
del counts_chunk_dense_gpu, counts_chunk_sparse_gpu, mus_chunk_gpu, pearson_chunk_gpu, denominator_gpu
|
|
@@ -126,8 +128,8 @@ def NBumiPearsonResidualsApproxGPU(
|
|
|
126
128
|
print(f"FUNCTION: NBumiPearsonResidualsApprox() | FILE: {cleaned_filename}")
|
|
127
129
|
|
|
128
130
|
# --- HANDSHAKE ---
|
|
129
|
-
# Multiplier
|
|
130
|
-
chunk_size = get_optimal_chunk_size(cleaned_filename, multiplier=
|
|
131
|
+
# Multiplier 10.0: Same safety logic as Full residuals.
|
|
132
|
+
chunk_size = get_optimal_chunk_size(cleaned_filename, multiplier=10.0, is_dense=True)
|
|
131
133
|
|
|
132
134
|
# --- Phase 1: Initialization ---
|
|
133
135
|
print("Phase [1/2]: Initializing parameters and preparing output file...")
|
|
@@ -191,7 +193,8 @@ def NBumiPearsonResidualsApproxGPU(
|
|
|
191
193
|
|
|
192
194
|
pearson_chunk_gpu = (counts_chunk_dense_gpu - mus_chunk_gpu) / denominator_gpu
|
|
193
195
|
|
|
194
|
-
|
|
196
|
+
# [OPTIMIZATION] Cast to float32 on GPU to halve PCIe transfer time
|
|
197
|
+
out_x[i:end_row, :] = pearson_chunk_gpu.astype(cupy.float32).get()
|
|
195
198
|
|
|
196
199
|
del counts_chunk_dense_gpu, counts_chunk_sparse_gpu, mus_chunk_gpu, pearson_chunk_gpu, denominator_gpu
|
|
197
200
|
cupy.get_default_memory_pool().free_all_blocks()
|
|
@@ -4,9 +4,9 @@ m3Drop/coreGPU.py,sha256=k7A06VNgfJ59J8g1VpfKxhTIKrEbW7Bj8pTbQqHaQL8,24571
|
|
|
4
4
|
m3Drop/diagnosticsCPU.py,sha256=BecOKTz2GDjzjs9ycXYsyrSHi2UVgsM58RBuNE62vmU,14273
|
|
5
5
|
m3Drop/diagnosticsGPU.py,sha256=SMJKsCttbI5feOIQC7w7eCe3kpxw1RzHBsWy-OtQh2M,19996
|
|
6
6
|
m3Drop/normalizationCPU.py,sha256=4ulCrDZZjxVFh2y0i4ayPkNCsZYaOP-Xq2Dnzu9WXtg,5697
|
|
7
|
-
m3Drop/normalizationGPU.py,sha256=
|
|
8
|
-
m3drop-0.4.
|
|
9
|
-
m3drop-0.4.
|
|
10
|
-
m3drop-0.4.
|
|
11
|
-
m3drop-0.4.
|
|
12
|
-
m3drop-0.4.
|
|
7
|
+
m3Drop/normalizationGPU.py,sha256=mHu_Or4ma6qzujGQQQ0oN3D-yoEngLAN4UTknkArRAY,8596
|
|
8
|
+
m3drop-0.4.34.dist-info/licenses/LICENSE,sha256=44Iqpp8Fc10Xzd5T7cT9UhO31Qftk3gBiCjtpwilP_k,1074
|
|
9
|
+
m3drop-0.4.34.dist-info/METADATA,sha256=gAefE3nHHVo4UzTL-0hbMiJTuOcFOxs75kQZ6-d7bJ8,5161
|
|
10
|
+
m3drop-0.4.34.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
11
|
+
m3drop-0.4.34.dist-info/top_level.txt,sha256=AEULFEFIgFtAwS-KBlIFoYXrqczX_rwqrEcdK46GIrA,7
|
|
12
|
+
m3drop-0.4.34.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|