• Z
    [API/OP]Add a new API paddle.diagonal (#33586) · ad106290
    zhangbo9674 提交于
    * new api diagonal, test=develop
    
    * add new api diagonal, test=develop
    
    * new api diagonal, test=develop
    
    * add new api paddle.diagonal, test=develop
    
    * use framework::stride replace ComputeDimStride
    
    * replace cudaMalloc/cudaMemcpy by TensorFormVector in cudaKernel and cudaGradKernel
    
    * perfect funciton: when attr(offset) is exceed attr(axis1) or attr(axis2), set the diagonal dim is 0
    
    * fix RP-Mac-CI bug: replace framework::stride() by ComputDimStride.
    
    * perfect code-block
    
    * perfect code of python API diagonal
    
    * api supports dtype of float16 and bool
    
    * api supports dtype of float16 and bool
    
    * modify unittest code
    
    * modify unittest code
    
    * perfect dtype describe
    
    * perfect code-block
    ad106290
__init__.py 17.5 KB