Skip to content

Commit

Permalink
refactor:: remove Layer Class Split, replace it with Tensor::split
Browse files Browse the repository at this point in the history
  • Loading branch information
yirongjie committed Sep 3, 2024
1 parent 4f6da8d commit 8842207
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 341 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ src/backends/qnn/qualcomm_ai_engine_direct_220/*
src/backends/qnn/HexagonSDK/*
examples/demo_deepseek.cpp
examples/demo_xllm.cpp
src/models/xllm/*
src/models/xllm/*
src/models/deepseek/*
4 changes: 2 additions & 2 deletions src/Layer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ class Matmul final : public Layer {
return ts[0].get();
}
};

/*
class Split final : public Layer {
public:
Split() = default;
Expand All @@ -570,7 +570,7 @@ class Split final : public Layer {
return run({input}, (int)param_["split_num"]);
}
};

*/
class Convolution2D final : public Layer {
public:
explicit Convolution2D(int in_channel, int out_channel, vector<int> kernal, vector<int> stride, PaddingType padding, bool bias, std::string name) {
Expand Down
3 changes: 2 additions & 1 deletion src/Tensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,8 @@ vector<std::reference_wrapper<Tensor>> Tensor::split(Tensor &input, std::vector<
std::vector<float> args;
for (int i = 0; i < each_dims.size(); ++i) {
args.push_back(each_dims[i]);
next_names.push_back(input.name() + "-split-" + std::to_string(i) + "-" + std::to_string(each_dims[i]));
// next_names.push_back(input.name() + "-split-" + std::to_string(i) + "-" + std::to_string(each_dims[i]));
next_names.push_back(input.name() + ".split-" + std::to_string(i));
}
args.push_back(split_dim);
args.push_back(head_size);
Expand Down
83 changes: 0 additions & 83 deletions src/models/deepseek/configuration_deepseek.hpp

This file was deleted.

203 changes: 0 additions & 203 deletions src/models/deepseek/modeling_deepseek.hpp

This file was deleted.

Loading

0 comments on commit 8842207

Please sign in to comment.