Optimization kernels taken from hiascend.com & triton-ascend.