tinygrad / tinygrad/tinygrad

Variable - expression equality bug?

Open
#13,179 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
33.6k
Forks
4.3k
Avg merge
3h 11m
Merged PRs (30d)
491

Description

not sure if I am missing something but...
when I compare following expressions (b and c) of one Variable (a) I get false (instead I would expect true):

python3 -c "from tinygrad import Variable; a=Variable('a',0,1); b=(a+6)*(a*22+264); c=(a+6)*(a+12)*22; print(b==c)"

Contributor guide

No contributing guide indexed for this repository

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

Run the provided Python command to reproduce the comparison result. Start by locating the Variable expression equality implementation and trace how the two equivalent expressions are compared. Done means the example reports true for b == c.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.