csarofeen / pytorch

Tensors and Dynamic neural networks in Python with strong GPU acceleration
http://pytorch.org
Other
26 stars 7 forks source link

Add deserialization support for RecordFunctor #2516

Closed rdspring1 closed 1 year ago

rdspring1 commented 1 year ago

This PR defines the RecordFunctorFactory class, which is used to deserialize the FlatBuffers RecordFunctor table. We create an Enum type for each RecordFunctor class. Each template specialization has a unique RecordType and parser function.

Flatbuffers Enums are represented as an unscoped enumeration, so we can map them to an Integer type. This Factory class contains a vector that maps from an Enum integer to its corresponding parser function. All parser functions have the same signature. We use std::bind to support functions that require extra arguments.

rdspring1 commented 1 year ago

Closed for https://github.com/NVIDIA/Fuser/pull/17