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

Function CallBackFunction

example/cpp/bert_model_example.cpp:45–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45static std::vector<float> CallBackFunction(
46 const std::shared_ptr<BertModel> model,
47 const std::vector<std::vector<int64_t>> input_ids,
48 const std::vector<std::vector<int64_t>> position_ids,
49 const std::vector<std::vector<int64_t>> segment_ids, PoolType pooltype,
50 bool use_pooler) {
51 return model->operator()(input_ids, position_ids, segment_ids, pooltype,
52 use_pooler);
53}
54
55bool test_multiple_threads(const std::string &model_path, bool only_input,
56 bool use_cuda, int n_threads) {

Callers

nothing calls this directly

Calls 1

operator()Method · 0.45

Tested by

no test coverage detected