hptt
hptt copied to clipboard
"ValueError: repeated axis in transpose" in hptt.ascontiguousarray, not in np.ascontiguousarray
Hi,
I tried to use the python API of hptt in analogy to numpy. For the following code, I met "ValueError: repeated axis in transpose" in hptt.ascontiguousarray, not in np.ascontiguousarray. May I know is this normal? If yes, what would be the reason for this issue? Thanks
import numpy as np
import hptt
import copy
n_a = n_b = n_c = 1
n_d = n_e = n_f = 2
dim_a = (n_a, n_b, n_c, n_d, n_e, n_f)
a = np.random.random(dim_a)
b = copy.deepcopy(a)
b = np.transpose(b, (1,0,2,3,5,4))
#print(b.flags)
#b = np.ascontiguousarray(b)
b = hptt.ascontiguousarray(b)