• Umang Yadav's avatar
    Add output_alias and runs_on_offload_target flags for the custom ops (#1309) · c9ffb38d
    Umang Yadav authored
    Adds two methods for the custom_ops virtual class.
    
    bool runs_on_offload_target(), if the custom op runs directly on the gpu then it should be set to true. in this case, custom op expects its parameters to reside in GPU memory and writes output to the GPU memory. If it is set to false then, custom op expects it's parameter to reside on the host and puts back the result into the host memory.
    
    output_alias, if output of the custom op is aliasing the input buffer. i.e. interpreting the same input buffer with differnet shape and strides.
    
    Update as_vector() in C++ API to handle non-standard shapes. It required exposing element_index to space_index conversion method for the shape class.
    c9ffb38d
migraphx.py 15.9 KB