Split iname fails if the stride length is a Numpy integer
If the stride of split_iname
is specified with an np.int32
then the function fails. Casting the number to a Python int avoids this.
Traceback (most recent call last):
File "elwise_linear_knl_4.py", line 164, in kern = gen_diff_knl(n_elem, n_in, n_out, arch="NVIDIA_GPU")
File "elwise_linear_knl_4.py", line 108, in gen_diff_knl knl = lp.split_iname(knl, "i", rowBlockSize, outer_tag="g.1", inner_tag=None, slabs=(0,0)) # Block of rows File "/home/nicholas/miniconda3/lib/python3.6/site-packages/loopy/transform/iname.py", line 358, in split_iname within=within)
File "/home/nicholas/miniconda3/lib/python3.6/site-packages/loopy/transform/iname.py", line 255, in _split_iname_backend new_domains = [process_set(dom) for dom in kernel.domains]
File "/home/nicholas/miniconda3/lib/python3.6/site-packages/loopy/transform/iname.py", line 255, in new_domains = [process_set(dom) for dom in kernel.domains]
File "/home/nicholas/miniconda3/lib/python3.6/site-packages/loopy/transform/iname.py", line 240, in process_set var_length_iname: -fixed_length})))
File "/home/nicholas/miniconda3/lib/python3.6/site-packages/islpy/init.py", line 541, in eq_from_names return c.set_coefficients_by_name(coefficients)
File "/home/nicholas/miniconda3/lib/python3.6/site-packages/islpy/init.py", line 459, in obj_set_coefficients_by_name self = self.set_coefficient_val(tp, idx, coeff)
File "/home/nicholas/miniconda3/lib/python3.6/site-packages/islpy/_isl.py", line 42542, in set_coefficient_val "be cast to a Val" % type(v))
TypeError: 'int' object is not callable