About inputs and outputs of a custom layer

I’m trying to add a custom layer and have to implement virtual member function of IPluginExt, enqueue, whose parameters are like below.

virtual int enqueue(int batchSize, const void* const* inputs, void** outputs, void* workspace, cudaStream_t stream)

Foe example in the case where

  • the input and output ITensor have kFLOAT type
  • and this custom layer also have kFLOAT type,

does casting the inputs[0] to some pointer type which is not consistent with kFLOAT (like int*) violate
the strict-aliasing rules ?
In other words, does this fall under the following ?

If a program attempts to access the stored value of an object through a glvalue whose type is not similar ([conv.qual]) to one of the following types the behavior is undefined

From my understanding, this is legal as long as inputs and outputs are just allocated storage with no dynamic type.

Thank you!

I’m sorry this topic is regarding TensorRT.
So please close this…