Unverified Commit b76b627b by ziheng Committed by GitHub

[BUGFIX] Fix for NoneType Target (#3792)

parent 975ab75c
...@@ -133,7 +133,8 @@ def add_partition_generic(ref_call, new_args, ctx): ...@@ -133,7 +133,8 @@ def add_partition_generic(ref_call, new_args, ctx):
@register_partition_function("add") @register_partition_function("add")
def add_partition_function(ref_call, new_args, ctx): def add_partition_function(ref_call, new_args, ctx):
"""Rewrite function for ewise add for partition""" """Rewrite function for ewise add for partition"""
if 'cuda' in _target.current_target().keys: target = _target.current_target()
if target and 'cuda' in target.keys:
#TODO(wuwei/ziheng) cuda specific rules #TODO(wuwei/ziheng) cuda specific rules
return add_partition_generic(ref_call, new_args, ctx) return add_partition_generic(ref_call, new_args, ctx)
return add_partition_generic(ref_call, new_args, ctx) return add_partition_generic(ref_call, new_args, ctx)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment