Onb function is not in optix7.0

Do i need to do it myself。

Well, yes. OptiX 7.0, unlike v.6 and before, is fully moved to CUDA-side, no hacky OptiX buffers, structures and math functions. So you really need to implement it yourself.
Good news is that it exists in SDK examples provided with OptiX 7.0. For example, in optixCutouts it was implemented in the next way

struct Onb
{
    __forceinline__ __device__ Onb( const float3& normal )
    {
        m_normal = normal;

        if( fabs( m_normal.x ) > fabs( m_normal.z ) )
        {
            m_binormal.x = -m_normal.y;
            m_binormal.y = m_normal.x;
            m_binormal.z = 0;
        }
        else
        {
            m_binormal.x = 0;
            m_binormal.y = -m_normal.z;
            m_binormal.z = m_normal.y;
        }

        m_binormal = normalize( m_binormal );
        m_tangent  = cross( m_binormal, m_normal );
    }

    __forceinline__ __device__ void inverse_transform( float3& p ) const
    {
        p = p.x * m_tangent + p.y * m_binormal + p.z * m_normal;
    }

    float3 m_tangent;
    float3 m_binormal;
    float3 m_normal;
};

Have a good day!

Thank you for your reply, I have done it myself.XD

Find a similar implementation in my OptiX 7 open-source examples with some additional member functions:
https://github.com/NVIDIA/OptiX_Apps/blob/master/apps/rtigo3/shaders/shader_common.h#L81