Needed to add tensor cast to pointer allocation