something wrong in the benchmark code
Courtesy-Xs opened this issue · 0 comments
Courtesy-Xs commented
Hi, I guess there is a problem in your benchmark code.
sampl = np.random.uniform(low=-1.0, high=1.0, size=(1000000, 128))
gadgetCPU = SpeedTorch.DataGadget( 'data.npy', CPUPinn = True )
indexess = np.random.randint(0,1000000, 131072)
gadgetCPU.insertData(u_embeddings.weight.data, indexess )
gadgetCPU is initialized and it's shape is (1000000,128), but the size of indexes is 131072 and when I copy the code and run on my docker environment, I came across an error like this:
self.CUPYcorpus[indexes] = cupy.fromDlpack( to_dlpack( dataObject ) )
SystemError: error return without exception set
And I change the sampl size and it works fine
benchmark code link
https://colab.research.google.com/drive/1b3QpfSETePo-J2TjyO6D2LgTCjVrT1lu#scrollTo=04iE5HtWYqOz&uniqifier=1