diff --git a/python/triton/language/core.py b/python/triton/language/core.py index 7d108f42c5a9..703936bf8e2b 100644 --- a/python/triton/language/core.py +++ b/python/triton/language/core.py @@ -2497,17 +2497,17 @@ def kernel(...): """ def __init__(self, arg1, arg2=None, step=None): - assert isinstance(arg1, constexpr) + assert isinstance(arg1, constexpr), f"{arg1} used as tl.static_range start value is not a constexpr" if step is None: self.step = constexpr(1) else: - assert isinstance(step, constexpr) + assert isinstance(step, constexpr), f"{step} used as tl.static_range step value is not a constexpr" self.step = step if arg2 is None: self.start = constexpr(0) self.end = arg1 else: - assert isinstance(arg2, constexpr) + assert isinstance(arg2, constexpr), f"{arg2} used as tl.static_range end value is not a constexpr" self.start = arg1 self.end = arg2