File tree Expand file tree Collapse file tree 2 files changed +2
-0
lines changed
slm/model_zoo/gpt-3/external_ops/token_dispatcher_utils Expand file tree Collapse file tree 2 files changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -246,6 +246,7 @@ std::vector<paddle::Tensor> tokens_unzip_stable(
246
246
}
247
247
const int rows = X.shape ()[0 ]; // 一般为seqlen
248
248
const int cols = X.shape ()[1 ]; // 一般为7168
249
+ if (rows==0 )return ;
249
250
const int quanted_cols = (XScale) ? XScale->shape ()[1 ] : 0 ;
250
251
/*
251
252
const int max_tokens_per_expert =
Original file line number Diff line number Diff line change @@ -747,6 +747,7 @@ std::vector<paddle::Tensor> tokens_zip(
747
747
unzipped_tokens.dtype () == paddle::DataType::FLOAT32);
748
748
const int rows = unzipped_tokens.shape ()[0 ]; // seqlen
749
749
const int cols = unzipped_tokens.shape ()[1 ]; // 一般为7168
750
+ if (rows==0 )return ;
750
751
const int topk = expert_routemap_topk.shape ()[1 ]; // 一般为8
751
752
752
753
You can’t perform that action at this time.
0 commit comments