This is interfering with my ability to get CUDA/GPU benchmarks for gh-146 and needs a regression test + fix added.
Reproducer is below, where both views need to be allocated to Device memory, otherwise control flows will not make sense at all--you can't have a global execution space default that cherry-picks the scenarios where it respects where things are being allocated, in the absence of an explicit specification to use the host.
import numpy as np
import pykokkos as pk
def main():
C = pk.View([8, 8], dtype=pk.double)
print("C.space:", C.space) # MemorySpace.HostSpace
a = np.ones((4, 4), dtype=float)
view_a = pk.from_numpy(a)
print("view_a.space:", view_a.space) # MemorySpace.CudaSpace
if __name__ == "__main__":
space = pk.ExecutionSpace.Cuda
pk.set_default_space(space)
main()
This is interfering with my ability to get CUDA/GPU benchmarks for gh-146 and needs a regression test + fix added.
Reproducer is below, where both views need to be allocated to Device memory, otherwise control flows will not make sense at all--you can't have a global execution space default that cherry-picks the scenarios where it respects where things are being allocated, in the absence of an explicit specification to use the host.