MCPcopy Create free account
hub / github.com/NVIDIA/FasterTransformer / threadForward

Function threadForward

examples/cpp/bert/bert_triton_example.cc:137–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135}
136
137int threadForward(std::unique_ptr<AbstractTransformerModelInstance>* model_instance,
138 std::shared_ptr<std::unordered_map<std::string, triton::Tensor>> request,
139 std::shared_ptr<std::unordered_map<std::string, triton::Tensor>>* output_tensors,
140 const int device_id)
141{
142 ft::check_cuda_error(cudaSetDevice(device_id));
143 *output_tensors = (*model_instance)->forward(request);
144 return 0;
145}
146
147template<typename T>
148int bert_triton_example(int argc, char* argv[])

Callers

nothing calls this directly

Calls 1

forwardMethod · 0.45

Tested by

no test coverage detected