dropped axis collapse optimization to simplify kernel code