You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the following code snippet which would generate sound code in earlier versions, but does not anymore:
importloopyaslpimportnumpyasnpt_unit=lp.make_kernel(
"{[i, j1,j2]: 0<=i<n and 0<=j1,j2<5}",
""" for i for j1 <> tmp1[j1] = x1[i, j1] out1[i, j1] = tmp1[j1] end ... lbarrier for j2 <> tmp2[j2] = x2[i, j2] out2[i, j2] = tmp2[j2] end end """,
[lp.GlobalArg("x1,x2,out1,out2",
shape=lp.auto,
dtype=np.float64),
...],
seq_dependencies=True,
)
knl=t_unit.default_entrypointnew_tvs= {name: tv.copy(base_storage="my_base",
address_space=lp.AddressSpace.LOCAL)
forname, tvinknl.temporary_variables.items()}
knl=knl.copy(temporary_variables=new_tvs)
t_unit=t_unit.with_kernel(knl)
print(lp.generate_code_v2(t_unit).device_code())
This raises with the following exception:
File "/home/kgk2/projects/firedrake_gpu/src/loopy/loopy/check.py", line 1315, in check_for_nested_base_storage raise ValueError("nothing known about storage array "ValueError: nothing known about storage array 'my_base' serving as base_storage of 'tmp1'
The text was updated successfully, but these errors were encountered:
But the error message is definitely unhelpful, we should fix that. I'll leave this issue open as a reminder to do that.
inducer
changed the title
Using base_storage for temporary_variables no longer works?
Fix error message for missing allocation for base_storageJul 22, 2024
Hi!
I have the following code snippet which would generate sound code in earlier versions, but does not anymore:
This raises with the following exception:
The text was updated successfully, but these errors were encountered: