GithubHelp home page GithubHelp logo

Comments (1)

alrevuelta avatar alrevuelta commented on July 17, 2024 1

The whole point of this project is to have a runtime that is as simple as possible and that can be compiled in with every compiler. If we start to rely on compiler-dependant features that are not widely supported by all compilers, we are losing the purpose of the project.

My suggestion is the following. We can get rid of all extern, weak and so on, and just have normal function prototypes.

//operator__onnx__conv__11.h file

operator_status operator__onnx__conv__11__T_tensor_float(
    node_context *ctx
);
operator_status operator__onnx__conv__11__T_tensor_float16(
    node_context *ctx
);

Then we autogenerate all files + functions with some dummy implementation.

//operator__onnx__conv__11__T_tensor_float.c file
operator__onnx__conv__11__T_tensor_float(node_context *ctx)
{
  return NOT_IMPLEMENTED;
}
//operator__onnx__conv__11__T_tensor_float16.c file
operator__onnx__conv__11__T_tensor_float16(node_context *ctx)
{
  return NOT_IMPLEMENTED;
}

And then if someone wants to implement an operator, they just have to locate the function/file (operator__onnx__conv__11__T_tensor_float for example) remove the return NOT_IMPLEMENTED and implement the operator.

Maybe not as fancy as using weak attributes, but do we really need that? This would fix also #32. Why not abstracting other developers form the complexity of generating all this? Just leave a function in place ready to be implemented.

from connxr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.