One: [docs] Write some Runtime documents

Created on 22 Jun 2020  路  9Comments  路  Source: Samsung/ONE

  • [x] [HowTo] Frontend API

    • [x] [how-to-use-nnfw-api.md](https://github.com/Samsung/ONE/blob/master/docs/howto/how-to-use-nnfw-api.md)

    • [x] [how-to-use-nnapi-binding.md](https://github.com/Samsung/ONE/blob/master/docs/howto/how-to-use-nnapi-binding.md) #3144

  • [x] [Runtime] API
  • [x] [Runtime] Core

    • [x] [core.md](https://github.com/Samsung/ONE/blob/master/docs/runtime/core.md) #2591

    • [x] [executors.md](https://github.com/Samsung/ONE/blob/master/docs/runtime/executors.md) #2755



      • Linear


      • Dataflow/Parallel (Experimental)



    • [x] Heterogeneous Execution #3189

  • [x] [Runtime] compute.md #3818
  • [x] [Runtime] Backends #4196

    • Backend API

    • Bundle(?) Backends

documentation typproject

Most helpful comment

Don't we need coding convention document?
FYI, AFAIK, some of coding convention of runtime and compiler are different.

All 9 comments

I'm planning to do at least one item a week.

@lemmaa Do you have an idea for the contents to fill https://github.com/Samsung/ONE/blob/master/docs/runtime/api.md ? I think we have documents for API already in how-to.

Don't we need coding convention document?
FYI, AFAIK, some of coding convention of runtime and compiler are different.

@wateret , I expect the documentation of runtime/* and compiler/* to be about the implementation structure or design philosophy, even roadmap, if the how-to/* documentation is for usage or troubleshooting.
In overview/* if we're dealing with an history or overview, runtime/* and compiler/* takes care of professional details.

FYI, AFAIK, some of coding convention of runtime and compiler are different.

@hyunsik-yoon Could you let me know how they are different? All I know is Compiler uses snake_case while Runtime uses camelCase for method names.

I'm asking since I would like to have just one document if two conventions are not much different.

From my experience, coding convention for coding convention has more strict rules:
e.g., header should be ordered from internal header to outside header, separated by one new line. All camel case method name (e.g., in runtme, getter for _cond_var is cond_var() or getCondVar() but in compiler it should be condVar() or getCondVar().) Function name (not methond) in runtime is void getTensor() { ... } but in compiler, void get_tensor() { ... } as far as I remember.
Also in compiler code, a function that is used only in a cc file should be located inside anonymous namespace.
And... a new line must be entered after namespace xxx { and before } // namespace.
Not very huge difference but several small ones.

From my experience, coding convention for coding convention has more strict rules:

What's coding convention for coding convention?

e.g., header should be ordered from internal header to outside header, separated by one new line. All camel case method name (e.g., in runtme, getter for _cond_var is cond_var() or getCondVar() but in compiler it should be condVar() or getCondVar().) Function name (not methond) in runtime is void getTensor() { ... } but in compiler, void get_tensor() { ... } as far as I remember.

I looked small part of compiler code but I see both cond_var and getCondVar but never like condVar.

And for methods, I see both snake_cases and camelCases. (As far as I remember we decided to follow the SE Team rule(camelCase) for methods)

Sorry about confusing. Copy and paster error. :-) From my experience, coding convention has more strict rules: was what I meant.

All done. Coding convention is out of scope, anyone may work on it if interested.

Was this page helpful?
0 / 5 - 0 ratings