Specify DLA core at build time and at runtime, why?

Hi,

In order to run on DLA, we need to specify the DLA core both in IBuilder::setDLACore() and IRuntime::setDLACore().

Why both? If I set it in the builder, doesn’t the serialized engine already contain this information?
And most importantly, what happens if both DLA cores don’t match at build and runtime? For example when building I set DLA 0 and when running I set DLA 1.

DLA Core is not a property of the engine that is preserved by serialization. When the engine is deserialized, it will be associated with the DLA core which is configured for the runtime via IRuntime::setDLACore().
If the engine is not serialized/deserialized before running, the value in IBuilder::SetDLACore() is used.
What DLA core you build on is independent of what DLA core you execute on, this is no different than GPU’s where you can have two TitanX’s and build on one and run on the other.

​​​​​​​Thanks