diff --git a/python/paddle/tensor/creation.py b/python/paddle/tensor/creation.py index ae785f1d0fecf82bb3eacce061ef38df4f30ffe9..540c03e36ba5d90c1642868e8083b7b5104c53e6 100644 --- a/python/paddle/tensor/creation.py +++ b/python/paddle/tensor/creation.py @@ -926,7 +926,8 @@ def _tril_triu_op(helper): assert x is not None, 'x cannot be None in {}'.format(op_type) check_variable_and_dtype( - x, 'x', ['float16', 'float32', 'float64', 'int32', 'int64'], op_type) + x, 'x', ['float16', 'float32', 'float64', 'int32', 'int64', 'bool'], + op_type) if len(x.shape) < 2: raise ValueError("x shape in {} must be at least 2-D".format(op_type)) diagonal = helper.kwargs.get('diagonal', 0)