Skip to content

Commit

Permalink
Fixed memory allocations.
Browse files Browse the repository at this point in the history
Signed-off by: David Rowenhorst <[email protected]>
  • Loading branch information
drowenhorst-nrl committed May 13, 2024
1 parent e73288f commit a93aa3b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyebsdindex/opencl/nlpar_cl.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def calcsigma_cl(self,nn=1,saturation_protect=True,automask=True, normalize_d=Fa
#print(gpuid)
clparams.get_context(gpu_id=gpuid, kfile = 'clnlpar.cl')
clparams.get_queue()
target_mem = clparams.queue.device.max_mem_alloc_size
target_mem = clparams.queue.device.max_mem_alloc_size//2
ctx = clparams.ctx
prg = clparams.prg
queue = clparams.queue
Expand Down
2 changes: 1 addition & 1 deletion pyebsdindex/opencl/nlpar_clray.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def calcnlpar_cl(self,chunksize=0, searchradius=None, lam = None, dthresh = None
rescale = rescale,
gpuid = gpuid)

target_mem = clparams.gpu[gpuid].max_mem_alloc_size//2
target_mem = clparams.gpu[gpuid].max_mem_alloc_size//3
max_mem = clparams.gpu[gpuid].global_mem_size*0.75
if target_mem*ngpuwrker > max_mem:
target_mem = max_mem/ngpuwrker
Expand Down

0 comments on commit a93aa3b

Please sign in to comment.