-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[C API] Initial interface proposal #396
Conversation
Codecov Report
@@ Coverage Diff @@
## master #396 +/- ##
==========================================
+ Coverage 89.47% 90.09% +0.61%
==========================================
Files 57 77 +20
Lines 3924 4733 +809
==========================================
+ Hits 3511 4264 +753
- Misses 413 469 +56
Continue to review full report at Codecov.
|
24d25d3
to
0a1ce01
Compare
Updated based on comments from @selitvin. Any thoughts @vkuzmin-uber? |
extern "C" { | ||
#endif | ||
|
||
typedef struct NP_TensorAllocator NP_TensorAllocator; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't follow this and other declarations above for NP_Status, NP_Neuropod, NP_NeuropodTensor- is it just a stub and actual declarations will be added later?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are the public facing header files (so these structs are opaque to users).
The definitions will be in _internal.h
files which will be added in another PR
See the TensorFlow C API for an example of this pattern
const NP_NeuropodValueMap *inputs, | ||
const char ** requested_outputs, | ||
NP_NeuropodValueMap ** outputs, | ||
NP_Status * status); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
who is responsible for allocating and "free" "NP_Status * status" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The caller is responsible for doing so (using NP_NewStatus
and NP_DeleteStatus
)
Summary:
An initial interface for a Neuropod C API.