Skip to content
Snippets Groups Projects

Add experimental half precison support

Merged Markus Holzer requested to merge holzer/pystencils:halfP into master
1 file
+ 4
1
Compare changes
  • Side-by-side
  • Inline
+ 4
1
@@ -39,7 +39,10 @@ def make_python_function(kernel_function_node, argument_dict=None, custom_backen
@@ -39,7 +39,10 @@ def make_python_function(kernel_function_node, argument_dict=None, custom_backen
if argument_dict is None:
if argument_dict is None:
argument_dict = {}
argument_dict = {}
half = True in (field.dtype.is_half() for field in kernel_function_node.fields_accessed)
half = False
 
for field in kernel_function_node.fields_accessed:
 
if field.dtype.base_type is None and field.dtype.is_half:
 
half = True
if cp.cuda.runtime.is_hip:
if cp.cuda.runtime.is_hip:
header_list = ['"gpu_defines.h"'] + list(get_headers(kernel_function_node))
header_list = ['"gpu_defines.h"'] + list(get_headers(kernel_function_node))
Loading