MCPcopy Create free account
hub / github.com/Tencent/TurboTransformers / CallBackFunction

Function CallBackFunction

example/cpp/bert_model_test.cpp:112–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110}
111
112static std::vector<float> CallBackFunction(
113 const std::shared_ptr<BertModel> model,
114 const std::vector<std::vector<int64_t>> input_ids,
115 const std::vector<std::vector<int64_t>> position_ids,
116 const std::vector<std::vector<int64_t>> segment_ids, PoolType pooltype,
117 bool use_pooler) {
118 return model->operator()(input_ids, position_ids, segment_ids, pooltype,
119 use_pooler);
120}
121
122static bool test_multiple_threads(bool only_input, int n_threads) {
123 std::shared_ptr<BertModel> model_ptr = std::make_shared<BertModel>(

Callers

nothing calls this directly

Calls 1

operator()Method · 0.45

Tested by

no test coverage detected