samples/graph_ops.c
rml_op CreatePlaceholderOp(rml_graph graph, const char* name, const uint32_t* shape)
{
    // Create placeholder operation
    rml_op_desc input_desc = {
        RML_OP_PLACEHOLDER, name, .placeholder = {RML_DTYPE_FLOAT32, RML_LAYOUT_NHWC}};
    memcpy(input_desc.placeholder.tensor_info.shape, shape, NHWC_RANK * sizeof(int));
    rml_op op_placeholder = NULL;
    RML_CHECK(rmlCreateOperation(graph, &input_desc, &op_placeholder));
    return op_placeholder;
}
/*
 * Create operation that holds information aboud input data
 *
 * @param graph - graph where operation is created
 * @param name - unique operation name
 * @param shape - shape of input tensor
 * @param row_index - index in array of shape
 * @return - created placeholder operation
 */
Create operation that holds information aboud input data


Create operation that holds information aboud input data
rml_op CreatePlaceholderOp(rml_graph graph, const char* name, const uint32_t* shape)
{
    rml_op_desc input_desc = {
        RML_OP_PLACEHOLDER, name, .placeholder = {RML_DTYPE_FLOAT32, RML_LAYOUT_NHWC}};
    memcpy(input_desc.placeholder.tensor_info.shape, shape, NHWC_RANK * sizeof(int));
    rml_op op_placeholder = NULL;
    RML_CHECK(rmlCreateOperation(graph, &input_desc, &op_placeholder));
    return op_placeholder;
}
rml_op CreatePlaceholderOp ( rml_graph graph , const char * name , const uint32_t * shape ) { rml_op_desc input_desc = { RML_OP_PLACEHOLDER , name , . placeholder = { RML_DTYPE_FLOAT32 , RML_LAYOUT_NHWC } } ; memcpy ( input_desc . placeholder . tensor_info . shape , shape , NHWC_RANK * sizeof ( int ) ) ; rml_op op_placeholder = NULL ; RML_CHECK ( rmlCreateOperation ( graph , & input_desc , & op_placeholder ) ) ; return op_placeholder ; }
Create operation that holds information aboud input data
Create operation that holds information aboud input data
// Create placeholder operation
