allocate memory from device?

this is a random noob question,

can you allocate memory on the device from inside a kernel?

No.