Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.
Merged
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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SPARSEZOO_TEST_MODE := "true"

BUILD_ARGS := # set nightly to build nightly release
TARGETS := "" # targets for running pytests: deepsparse,keras,onnx,pytorch,pytorch_models,pytorch_datasets,tensorflow_v1,tensorflow_v1_models,tensorflow_v1_datasets
PYTEST_ARGS ?= "--ignore tests/integrations"
PYTEST_ARGS ?= --ignore tests/integrations
PYTEST_INTEG_ARGS ?= ""
ifneq ($(findstring deepsparse,$(TARGETS)),deepsparse)
PYTEST_ARGS := $(PYTEST_ARGS) --ignore tests/sparseml/deepsparse
Expand Down
2 changes: 2 additions & 0 deletions src/sparseml/pytorch/sparsification/pruning/mask_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,8 @@ def update_param_masks(self, target: Union[float, List[float]]) -> List[Tensor]:
target = [target] * len(self._params)
if self.adjust_target_sparsity_for_thinning:
for idx, sparsity_val in enumerate(target):
if sparsity_val is None:
continue # ie constant pruning
applied_thinning = self._params_applied_thinning[idx]
if applied_thinning > 0.0:
# adjust sparsity for thinned (compressed) layer param
Expand Down