Skip to content

Commit

Permalink
Better warning handling around OpenCL builds.
Browse files Browse the repository at this point in the history
Signed-off by: David Rowenhorst <[email protected]>
  • Loading branch information
drowenhorst-nrl committed Dec 9, 2024
1 parent a934022 commit baa818e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyebsdindex/opencl/openclparam.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ def get_context(self, gpu_id=None, kfile = 'clkernels.cl' ):
self.ctx = cl.Context(devices = [self.gpu[self.gpu_id]])

kernel_location = path.dirname(__file__)
with warnings.catch_warnings():
with warnings.catch_warnings(): # put in to supress OpenCL build warnings -- especially on NVIDIA platforms.
warnings.simplefilter("ignore")
self.prg = cl.Program(self.ctx,open(path.join(kernel_location,kfile)).read()).build(options=['-cl-std=CL1.2', '-w'])
#warnings.resetwarnings()

#print('ctx', self.gpu_id)
return self.ctx
def get_queue(self, gpu_id=None):
Expand Down

0 comments on commit baa818e

Please sign in to comment.