Skip to content

Commit

Permalink
Attempt to fix Apple M-series and NLPAR gpu
Browse files Browse the repository at this point in the history
Signed-off by: David Rowenhorst <[email protected]>
  • Loading branch information
drowenhorst-nrl committed Jun 10, 2024
1 parent a7162ac commit d742733
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyebsdindex/_ebsd_index_parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ def index_pats_distributed(
ngpupro = min(max(6, ngpu*6), 12) # number of processes that will serve data to the gpu
#ngpupro = 8
if n_cpu_nodes < 8:
ngpupro = min(ngpupro,8)
ngpupro = min(ngpupro, n_cpu_nodes)
if n_cpu_nodes < 2:
ngpupro = 2
#if OSPLATFORM == 'Linux':
Expand Down
4 changes: 2 additions & 2 deletions pyebsdindex/opencl/nlpar_cl.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def calcsigma_cl(self,nn=1,saturation_protect=True,automask=True, normalize_d=Fa
#print(gpu_id)
clparams.get_context(gpu_id=gpu_id, kfile = 'clnlpar.cl')
clparams.get_queue()
target_mem = clparams.queue.device.max_mem_alloc_size//2
target_mem = min(clparams.queue.device.max_mem_alloc_size//2, int(4e9))
ctx = clparams.ctx
prg = clparams.prg
queue = clparams.queue
Expand Down Expand Up @@ -400,7 +400,7 @@ def calcnlpar_cl(self, searchradius=None, lam = None, dthresh = None, saturation
#print(gpu_id)
clparams.get_context(gpu_id=gpu_id, kfile ='clnlpar.cl')
clparams.get_queue()
target_mem = clparams.queue.device.max_mem_alloc_size//2
target_mem = min(clparams.queue.device.max_mem_alloc_size//4, int(2e9))
ctx = clparams.ctx
prg = clparams.prg
queue = clparams.queue
Expand Down

0 comments on commit d742733

Please sign in to comment.