Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No quantization of parameter with name ending in _Wt #747

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
8 changes: 5 additions & 3 deletions src/tensors/cpu/fbgemm/expression_graph_packable.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ class ExpressionGraphPackable : public ExpressionGraph {
// int8 - all the weights used for affine op and dot op
// fp16 - all the weights used for affine op
if ((gemmElementType == Type::packed8avx2 || gemmElementType == Type::packed8avx512)
&& (pName.find("_W") == pName.length() - 3 || pName.find("_W") == pName.length() - 2)) {
&& ((pName.find("_W") == pName.length() - 3 && pName.back() != 't')
|| pName.find("_W") == pName.length() - 2)) {
#if USE_FBGEMM
using namespace marian::cpu::variant;
// packing information - size
Expand Down Expand Up @@ -85,7 +86,8 @@ class ExpressionGraphPackable : public ExpressionGraph {
ABORT("Packed type {} only supported when compiled with -DUSE_FBGEMM=on", gemmElementType);
#endif
// fp16 quantization option
} else if (gemmElementType == Type::packed16 && pName.find("_W") == pName.length() - 3) {
} else if(gemmElementType == Type::packed16 && pName.find("_W") == pName.length() - 3
&& pName.back() != 't') {
#if USE_FBGEMM
using namespace marian::cpu::variant;

Expand Down Expand Up @@ -153,4 +155,4 @@ class ExpressionGraphPackable : public ExpressionGraph {
}
};

} // namespace marian
} // namespace marian