GithubHelp home page GithubHelp logo

Build system ideas about connxr HOT 6 OPEN

alrevuelta avatar alrevuelta commented on August 16, 2024 1
Build system ideas

from connxr.

Comments (6)

robinvanemden avatar robinvanemden commented on August 16, 2024 1

Hi @nopeslide! I am currently finishing another project, which is keeping me rather busy (ergo the emoji). But for my next project, I need to convert ONNX (including the ML ops) to C99. So if cONNXr didn't exist, I would have had to invent it 😃 I hope to be able to contribute more actively soon!

from connxr.

nopeslide avatar nopeslide commented on August 16, 2024

@robinvanemden come out of the shadows, you emoji guerrilla.
what's your interest in connxr? :D

from connxr.

nopeslide avatar nopeslide commented on August 16, 2024

Hi @nopeslide! I am currently finishing another project, which is keeping me rather busy (ergo the emoji). But for my next project, I need to convert ONNX (including the ML ops) to C99. So if cONNXr didn't exist, I would have had to invent it smiley I hope to be able to contribute more actively soon!

funny story, it's the same reason I started working on connxr. I need a simple framework to integrate it into simulations, especially the ML operators. I also had the options to start from scratch, but found connxr while going through all github onnx projects :D
that's one of the reasons I push it in the direction of being easy to customize and extend. look forward to your contributions ;D

from connxr.

alrevuelta avatar alrevuelta commented on August 16, 2024

Great that you find it useful :D

connxr is currently completely dependant on the onnx_generator
makes customizations hard, since they would have to be in sync with the onnx_generator
onnx_generator should act as template builder, not as hacky configuration tool

We talked a bit about the role of onnx_generator in #50. My view of onnx_generator is that it should be totally dependant on onnx. So we target one specific onnx version (ideally the latest, and we keep evolving as onnx does) so we have always what is latest (operator sets versions and schema). So I would keep it as it is, so it just calls the script and generates all operators/resolvers/... of the latest onnx version.

Then, on the other side we can have the building system that you are referring to. In my opinion this building system should take the following inputs:

  • Operator set to support, i.e. 10.
  • Specific operators to support. If someone doesn't want to have all 123123143423 operators in the binary, just compile and link the ones that are relevant.
  • Specific data type. Maybe someone just wants the float type, so not all functions should be compiled.

All previous inputs are just an idea, but I think it would be good to think about them. Maybe some more are needed.

Regarding KConfig, nothing against and I have never used. If we can benefit from it of course you can use it, but can't we use some other kind of tool? Don't think that we need this graphical UI menus. Maybe some kind of configurable Makefile would be sufficient. Or Python generating a Makefile? Haven't used CMake much, could it be useful here?

onnx_generator does not control the build process anymore

Is it controlling it? Its just calling the Python script that generates the files/funcions. What do you mean by controlling the build process?

we should have a venv for these

How do you think we can do this? Shouldn't the venv be responsibility of the user that is using the software. Isn't it enough having the requirements file?

from connxr.

alrevuelta avatar alrevuelta commented on August 16, 2024

One more comment regarding onnx_generator. I see this as some kind of way of updating our repo to the latest onnx version. Hei! onnx released a new version. Ok, lets run onnx_generator to generate the newest operators and implement them.

And btw, I plan to include in onnx_generator also a script to pull all the testcases for all operators. Found a way to walk through all previous versions and have all test cases. So whenever a new version is released, we can get also the test cases for that new opset. Note that onnx testing backend only contains the latest opset version as discussed onnx/onnx#2912

from connxr.

nopeslide avatar nopeslide commented on August 16, 2024

We talked a bit about the role of onnx_generator in #50. My view of onnx_generator is that it should be totally dependant on onnx. So we target one specific onnx version (ideally the latest, and we keep evolving as onnx does) so we have always what is latest (operator sets versions and schema). So I would keep it as it is, so it just calls the script and generates all operators/resolvers/... of the latest onnx version.

I'm with you, onnx_generator should only use a single onnx version as reference and nothing more.
I'm against generating everything in one go, because it will then update/overwrite everything.
I want one tool to generate templates for a specific operator, and one tool to generate global structures like onnx sets.
So the sets are sth we only touch when onnx updates, and operators can be added as we go.

Then, on the other side we can have the building system that you are referring to. In my opinion this building system should take the following inputs:

* Operator set to support, i.e. 10.

* Specific operators to support. If someone doesn't want to have all 123123143423 operators in the binary, just compile and link the ones that are relevant.

* Specific data type. Maybe someone just wants the `float` type, so not all functions should be compiled.

All previous inputs are just an idea, but I think it would be good to think about them. Maybe some more are needed.

Yes at least these options, I already have a demo, will continue working on it when #57 is through.

Regarding KConfig, nothing against and I have never used. If we can benefit from it of course you can use it, but can't we use some other kind of tool? Don't think that we need this graphical UI menus. Maybe some kind of configurable Makefile would be sufficient. Or Python generating a Makefile? Haven't used CMake much, could it be useful here?

CMake is hell imo. It is essentially make, but overloaded with so many macros, either sth happen automagically or you are searching hours inside its documentation. make on the other hand is plain stupid and you have to do a lot of stuff manually, but you can just do it.

KConfig generates a list of defines for make and the preprocessor. It handles the config and puts out these two files to be integrated in the normal workflow. the Graphical ui is optional, but appreciated at some point (it show you dependencies between options and help messages).
The idea behind Kconfig is simple: you write your normal Makefile (but with Kconfig compatible variables) and the Kconfig generated variable definitions just overwrite your default make options.

onnx_generator does not control the build process anymore

Is it controlling it? Its just calling the Python script that generates the files/funcions. What do you mean by controlling the build process?

Since we need it to generate the operator sets, it is controlling the build. You can't configure the operator set, you have to generate it. Would love to have this configuration inside the actual build system (since it's a build configuration) instead of replacing code.

we should have a venv for these

How do you think we can do this? Shouldn't the venv be responsibility of the user that is using the software. Isn't it enough having the requirements file?

I would use our requirements.txt to build a venv via make. the use can still choose the construct their own venv, but we should at least generate our own as default.

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.