Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
distiller
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
llvm
distiller
Commits
8d694a03
Commit
8d694a03
authored
6 years ago
by
Guy Jacob
Browse files
Options
Downloads
Patches
Plain Diff
Bugfix in test_quantizer
parent
107e4825
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_quantizer.py
+4
-2
4 additions, 2 deletions
tests/test_quantizer.py
with
4 additions
and
2 deletions
tests/test_quantizer.py
+
4
−
2
View file @
8d694a03
...
@@ -317,15 +317,17 @@ def test_param_quantization(model, optimizer, qbits, bits_overrides, explicit_ex
...
@@ -317,15 +317,17 @@ def test_param_quantization(model, optimizer, qbits, bits_overrides, explicit_ex
if
has_children
(
pre_quant_module
):
if
has_children
(
pre_quant_module
):
continue
continue
num_bits
=
expected_qbits
[
name
].
wts
num_
q
bits
=
expected_qbits
[
name
].
wts
for
param_name
,
pre_quant_param
in
pre_quant_module
.
named_parameters
():
for
param_name
,
pre_quant_param
in
pre_quant_module
.
named_parameters
():
quantizable
=
num_bits
is
not
None
quantizable
=
num_
q
bits
is
not
None
if
param_name
.
endswith
(
'
bias
'
):
if
param_name
.
endswith
(
'
bias
'
):
quantizable
=
quantizable
and
quantize_bias
quantizable
=
quantizable
and
quantize_bias
# Bias number of bits is hard-coded to 32 for now...
# Bias number of bits is hard-coded to 32 for now...
if
quantizable
:
if
quantizable
:
num_bits
=
32
num_bits
=
32
else
:
num_bits
=
num_qbits
if
quantizable
and
train_with_fp_copy
:
if
quantizable
and
train_with_fp_copy
:
# "param_name" and "pre_quant_param" refer to the float copy
# "param_name" and "pre_quant_param" refer to the float copy
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment