Skip to content

Commit d2eaf8c

Browse files
committed
refactor: update destructors to use default implementation.
1 parent 8970079 commit d2eaf8c

28 files changed

+32
-29
lines changed

xllm/core/layers/common/qwen2_5_vision_layer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class Qwen2_5_VisionLayerImpl : public torch::nn::Module {
3737
explicit Qwen2_5_VisionLayerImpl(const ModelContext& context,
3838
bool is_qwen3_style = false);
3939

40-
~Qwen2_5_VisionLayerImpl() {};
40+
~Qwen2_5_VisionLayerImpl() override = default;
4141

4242
void load_state_dict(const StateDict& state_dict);
4343

xllm/core/layers/common/qwen2_decoder_layer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class Qwen2DecoderLayerImpl : public torch::nn::Module {
4444
public:
4545
explicit Qwen2DecoderLayerImpl(const ModelContext& context);
4646

47-
~Qwen2DecoderLayerImpl() {};
47+
~Qwen2DecoderLayerImpl() override = default;
4848

4949
void load_state_dict(const StateDict& state_dict);
5050

xllm/core/layers/common/qwen3_moe_decoder_layer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class Qwen3MoeDecoderLayerImpl : public torch::nn::Module {
3737
explicit Qwen3MoeDecoderLayerImpl(const ModelContext& context,
3838
int32_t layer_id);
3939

40-
~Qwen3MoeDecoderLayerImpl() {};
40+
~Qwen3MoeDecoderLayerImpl() override = default;
4141

4242
void load_state_dict(const StateDict& state_dict);
4343

xllm/core/layers/mlu/deepseek_v2_decoder_layer_impl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class DeepseekV2DecoderLayerImpl : public torch::nn::Module {
3939
explicit DeepseekV2DecoderLayerImpl(const ModelContext& context,
4040
int32_t layer_id);
4141

42-
~DeepseekV2DecoderLayerImpl() {};
42+
~DeepseekV2DecoderLayerImpl() override = default;
4343

4444
void load_state_dict(const StateDict& state_dict);
4545

xllm/core/layers/npu/buffer/atb_buffer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ AtbBuffer::AtbBuffer(uint64_t buffer_size, at::Device device)
4848
}
4949
}
5050

51-
AtbBuffer::~AtbBuffer() {}
51+
AtbBuffer::~AtbBuffer() = default;
5252

5353
void* AtbBuffer::get_buffer(uint64_t buffer_size) {
5454
if (buffer_size <= buffer_size_) {

xllm/core/layers/npu/buffer/atb_workspace.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ AtbWorkspace::AtbWorkspace(at::Device device) {
3030
}
3131
}
3232

33-
AtbWorkspace::~AtbWorkspace() {}
33+
AtbWorkspace::~AtbWorkspace() = default;
3434

3535
void* AtbWorkspace::get_workspace_buffer(uint64_t bufferSize) {
3636
int32_t device_id = 0;

xllm/core/layers/npu/npu_base_layer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ enum class LinearTypeV2 : int {
104104
class BaseLayer : public torch::nn::Module {
105105
public:
106106
explicit BaseLayer(const ModelContext& context);
107-
virtual ~BaseLayer() {};
107+
virtual ~BaseLayer() override = default;
108108

109109
atb::Status execute_node(atb_speed::Model::Node& node,
110110
int nodeId = 0,

xllm/core/layers/npu/npu_block_copy_impl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class NpuBlockCopyImpl : public BaseLayer {
4343
public:
4444
explicit NpuBlockCopyImpl(const ModelContext& context);
4545

46-
~NpuBlockCopyImpl() {};
46+
~NpuBlockCopyImpl() override = default;
4747

4848
void load_state_dict(const StateDict& state_dict) {};
4949

xllm/core/layers/npu/npu_column_parallel_linear_impl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class NpuColumnParallelLinearImpl : public BaseLayer {
5050
public:
5151
NpuColumnParallelLinearImpl(const ModelContext& context);
5252

53-
~NpuColumnParallelLinearImpl() {};
53+
~NpuColumnParallelLinearImpl() override = default;
5454

5555
virtual void merge_loaded_weights() override;
5656

xllm/core/layers/npu/npu_deepseek_v2_decoder_layer_impl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class NpuDeepseekV2DecoderLayerImpl : public BaseLayer {
109109
explicit NpuDeepseekV2DecoderLayerImpl(const ModelContext& context,
110110
const int32_t layer_id);
111111

112-
~NpuDeepseekV2DecoderLayerImpl() {};
112+
~NpuDeepseekV2DecoderLayerImpl() override = default;
113113

114114
virtual void merge_loaded_weights() override;
115115

0 commit comments

Comments
 (0)