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
The following snippet will hang nim compilation.
Nim processes will consume a lot of Cpu and must be killed manually.
The strange thing is that to compile, I can uncomment:
either the method
or the tensor object creation (with static generic)
typeBackend*=enumCpuTensor*[B: static[Backend]; T] =object
data: seq[T]
proctoTensor*[T](s:openarray[T], B: static[Backend]): Tensor[B,T] =result.data =@s
####typeAutograd=refobjectofRootObjmethodforward[B,T](self: Autograd, list_tensors: varargs[Tensor[B,T]]): T {.base.}=raisenewException(ValueError, "Forward is not implemented for this function")
typeAddFn=refobjectofAutograd## Commenting either the following will make the program compilesmethodforward[B,T](self: AddFn, a, b: Tensor[B,T]): T =return1+1## Or commenting the following will make the program compileslet a = [0,1,2,3,4,5].toTensor(Cpu)
Without static at all, everything compiles.
typeBackend*=enumCpuTensor*[T] =object
data: seq[T]
proctoTensor*[T](s:openarray[T]): Tensor[T] =result.data =@s
####typeAutograd=refobjectofRootObjmethodforward[T](self: Autograd, list_tensors: varargs[Tensor[T]]): T {.base.}=raisenewException(ValueError, "Forward is not implemented for this function")
typeAddFn=refobjectofAutograd## No issuemethodforward[T](self: AddFn, a, b: Tensor[T]): T =return1+1## No issuelet a = [0,1,2,3,4,5].toTensor()
I'm using Nim 0.17 on MacOS (install by choosenim stable)
The text was updated successfully, but these errors were encountered:
The following snippet will hang nim compilation.
Nim processes will consume a lot of Cpu and must be killed manually.
The strange thing is that to compile, I can uncomment:
method
Without static at all, everything compiles.
I'm using Nim 0.17 on MacOS (install by choosenim stable)
The text was updated successfully, but these errors were encountered: