MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT / enqueue

Method enqueue

plugin/geluPlugin/geluPlugin.cpp:182–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

180}
181
182int32_t GeluPluginDynamic::enqueue(nvinfer1::PluginTensorDesc const* inputDesc,
183 nvinfer1::PluginTensorDesc const* outputDesc, void const* const* inputs, void* const* outputs, void* workspace,
184 cudaStream_t stream) noexcept
185{
186 try
187 {
188 PLUGIN_VALIDATE(inputDesc != nullptr);
189 PLUGIN_VALIDATE(inputs != nullptr);
190 PLUGIN_VALIDATE(outputs != nullptr);
191 }
192 catch (std::exception const& e)
193 {
194 caughtError(e);
195 return STATUS_FAILURE;
196 }
197
198 int32_t const inputVolume = volume(inputDesc[0].dims);
199
200 // Our plugin outputs only one tensor.
201 // Launch CUDA kernel wrapper and save its return value.
202 switch (mType)
203 {
204 case DataType::kFLOAT: return enqueueTyped<float>(inputs[0], outputs[0], inputVolume, stream);
205 case DataType::kHALF: return enqueueTyped<half>(inputs[0], outputs[0], inputVolume, stream);
206 default: return STATUS_FAILURE;
207 }
208}
209
210// IPluginV2Ext Methods
211nvinfer1::DataType GeluPluginDynamic::getOutputDataType(

Callers

nothing calls this directly

Calls 2

caughtErrorFunction · 0.85
volumeFunction · 0.50

Tested by

no test coverage detected