-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[serialization] Add support to serialize to memory, and a basic serialization tutorial #7760
Conversation
A Julia set is a cool example, but I don't think it belongs in a tutorial about serialization. The tutorial about serialization shouldn't have anything that a reader needs to try to understand in it that's not either introduced in an earlier lesson or directly related to serialization (e.g. the Complex struct). It would be better to use e.g. the simpler blur pipeline from lesson 7, but using an ImageParam instead of the direct Buffer reference so that the tutorial can also handle reconnecting parameters. |
Yeah, I went back and forth on this ... I'm happy to change it to a simple blur. My reasoning was that we should have a reasonably complex pipeline to serialize, but I agree that there's too much unrelated material for a tutorial about serialization. I'll change it! |
I discovered that the |
My understanding was that it was supposed to create new Parameters for you in that case. |
Looks like Param<> acts as a scalar Param with a dynamic type, so for the Internal::Parameter API issue I think the methods should take separate maps for scalar and buffer params, e.g:
Open to other opinions though. What we discussed in the dev meeting was just making Internal::Parameter public, but that increases our public API surface. |
That sounds like a good plan, and can be implemented with minimal changes |
Can we please introduce aliases for these maps and use them everywhere, since these are unwieldy, eg
|
I'm starting to think that might be preferable, assuming we do the relevant API cleanup on Parameter per the discussion |
This PR doesn't appear to be very close to ready -- decisions about making |
Yes, I’ll make this to a draft until we sort out the API changes. |
Add error messages to deserializer for missing params Update tutorial
Added issue to track missing ImageParams during deserialization #7862 |
Updated to include changes to make parameter map optional for serialize(...) #7849 |
Ready to merge ... we'll address #7862 in another PR. |
@alexreinking @abadams Friendly ping for approval |
…lization tutorial (halide#7760) * Add in-memory buffer serialize/deserialize support. * Add basic serialization tutorial * Clang format pass * Update doc strings to use Doxygen formatted args * Clear out data buffer during serialization * Update serialization tutorial to use simple blur example with ImageParam * Make parameter map optional for serialize halide#7849 Add error messages to deserializer for missing params Update tutorial * Clang format pass --------- Co-authored-by: Derek Gerstmann <dgerstmann@adobe.com> Co-authored-by: Steven Johnson <srj@google.com>
No description provided.