microsoft / microsoft/microxcaling

_quantize_mx() is not handling axes=None proper

Open
#36 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
364
Forks
53
PR merge metrics
No merged PRs in 30d

Description

It seems _quantize_mx() is not properly handling axes=None.

At
https://github.com/microsoft/microxcaling/blob/7bc41952de394f5cc5e782baf132e7c7542eb4e4/mx/mx_ops.py#L194

    return _quantize_mx(
  File "c:\mx\microxcaling\mx_ops.py", line 194, in _quantize_mx
    axes = [x + A.ndim if x < 0 else x for x in axes]
TypeError: 'NoneType' object is not iterable 

Should not axes be initialized to shape of A if None?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read mx/mx_ops.py around line 194 and trace _quantize_mx() callers that pass axes=None. Reproduce the TypeError, then verify that quantization with axes=None uses the intended axes derived from A and does not fail.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.