|
|
|
|
@ -6263,8 +6263,7 @@ def lod_reset(x, y=None, target_lod=None):
|
|
|
|
|
out = helper.create_variable_for_type_inference(dtype=x.dtype)
|
|
|
|
|
if y is not None:
|
|
|
|
|
check_type(y, 'y', (Variable), 'lod_reset')
|
|
|
|
|
if y.lod_level == 0:
|
|
|
|
|
check_variable_and_dtype(y, 'y', ['int32'], 'lod_reset')
|
|
|
|
|
#TODO: check y.lod_level = 0 dtype
|
|
|
|
|
helper.append_op(
|
|
|
|
|
type="lod_reset", inputs={'X': x,
|
|
|
|
|
'Y': y}, outputs={'Out': out})
|
|
|
|
|
@ -6335,8 +6334,7 @@ def lod_append(x, level):
|
|
|
|
|
|
|
|
|
|
if isinstance(level, Variable):
|
|
|
|
|
inputs['Y'] = level
|
|
|
|
|
if level.lod_level == 0:
|
|
|
|
|
check_variable_and_dtype(level, 'level', ['int32'], 'lod_append')
|
|
|
|
|
#TODO: check y.lod_level = 0 dtype
|
|
|
|
|
else:
|
|
|
|
|
attrs['target_lod'] = level
|
|
|
|
|
helper.append_op(
|
|
|
|
|
|