Register local_elemwise_alloc for both the CPU and GPU ops.