mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2026-04-23 08:21:53 +08:00
[XPU] support XPU VL model inference (#4030)
* [XPU] support XPU VL model inference * fix image op import and device check * rebase develop * fix perf
This commit is contained in:
@@ -140,6 +140,25 @@ DLL_EXPORT int quant2d_per_channel(api::Context *ctx, const TX *x,
|
||||
const TSCALE *scale_in, TY *y,
|
||||
TSCALE *scale_out, int64_t m, int64_t n);
|
||||
|
||||
DLL_EXPORT int text_image_index_out(Context* ctx,
|
||||
const int* token_type_ids, // x
|
||||
int* text_index, // y1
|
||||
int* image_index, // y2
|
||||
const int64_t token_num);
|
||||
|
||||
template <typename T>
|
||||
DLL_EXPORT int text_image_gather_scatter(api::Context* ctx,
|
||||
T* input,
|
||||
T* text_input,
|
||||
T* image_input,
|
||||
int* token_type_ids,
|
||||
int* text_index,
|
||||
int* image_index,
|
||||
int64_t token_num,
|
||||
int64_t text_token_num,
|
||||
int64_t image_token_num,
|
||||
int64_t hidden_size,
|
||||
bool is_scatter);
|
||||
|
||||
/*--------------------------------------- MTP being --------------------------------------------*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user