Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions docs/en/supported_models.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,4 @@
## Rec
| | NPU | MLU | ILU |
| --- | :---: | :---: | :---: |
| | | | |
| | | | |
| | | | |
| OneRec | ✅ | ❌ | ❌ |
4 changes: 1 addition & 3 deletions docs/zh/supported_models.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,4 @@
## Rec
| | NPU | MLU | ILU |
| --- | :---: | :---: | :---: |
| | | | |
| | | | |
| | | | |
| OneRec | ✅ | ❌ | ❌ |
2 changes: 1 addition & 1 deletion xllm/c_api/internal/rec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ XLLM_CAPI_EXPORT bool xllm_rec_initialize(
FLAGS_enable_prefill_piecewise_graph = true;
FLAGS_enable_xattention_one_stage = false;
FLAGS_enable_graph_mode_decode_no_padding = true;
// FLAGS_enable_rec_prefill_only = true;
FLAGS_enable_rec_prefill_only = true;
FLAGS_enable_topk_sorted = false;

options.enable_graph(FLAGS_enable_graph);
Expand Down
17 changes: 8 additions & 9 deletions xllm/core/util/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ std::vector<uint32_t> cal_vec_split_index(uint32_t vec_size,
return split_index;
}

torch::Dtype convert_rec_type_to_torch(proto::DataType data_type) {
torch::ScalarType convert_rec_type_to_torch(proto::DataType data_type) {
// Future extensions go here.
switch (data_type) {
case proto::DataType::FLOAT:
Expand All @@ -172,8 +172,7 @@ torch::Dtype convert_rec_type_to_torch(proto::DataType data_type) {
return torch::kInt16;

default:
throw std::runtime_error("Unsupported data type: " +
std::to_string(static_cast<int>(data_type)));
LOG(FATAL) << "Unsupported data type: " << static_cast<int>(data_type);
}
}

Expand All @@ -186,12 +185,12 @@ torch::Tensor convert_rec_tensor_to_torch(
}

if (!input_tensor.has_contents()) {
throw std::runtime_error("Input tensor '" + input_tensor.name() +
"' has no contents");
LOG(FATAL) << "Input tensor '" << input_tensor.name()
<< "' has no contents";
}

const auto& contents = input_tensor.contents();
torch::Dtype dtype = convert_rec_type_to_torch(input_tensor.data_type());
torch::ScalarType dtype = convert_rec_type_to_torch(input_tensor.data_type());

switch (dtype) {
case torch::kFloat32: {
Expand Down Expand Up @@ -240,8 +239,8 @@ torch::Tensor convert_rec_tensor_to_torch(
}

default:
throw std::runtime_error("Unhandled data type conversion for: " +
std::to_string(static_cast<int>(dtype)));
LOG(FATAL) << "Unhandled data type conversion for: "
<< static_cast<int>(dtype);
}
}

Expand Down Expand Up @@ -652,4 +651,4 @@ int32_t ceil_pow2(int32_t n) {
}

} // namespace util
} // namespace xllm
} // namespace xllm
Loading