diff --git a/examples/beautiful_mnist.py b/examples/beautiful_mnist.py index cc0cba2e25..45feaa9779 100644 --- a/examples/beautiful_mnist.py +++ b/examples/beautiful_mnist.py @@ -27,7 +27,7 @@ if __name__ == "__main__": def train_step() -> Tensor: with Tensor.train(): opt.zero_grad() - samples = Tensor.randint(512, high=X_train.shape[0]) + samples = Tensor.randint(getenv("BS", 512), high=X_train.shape[0]) # TODO: this "gather" of samples is very slow. will be under 5s when this is fixed loss = model(X_train[samples]).sparse_categorical_crossentropy(Y_train[samples]).backward() opt.step() diff --git a/tinygrad/codegen/lowerer.py b/tinygrad/codegen/lowerer.py index e9a13f7fc9..944a1116aa 100644 --- a/tinygrad/codegen/lowerer.py +++ b/tinygrad/codegen/lowerer.py @@ -23,7 +23,7 @@ render_ops: Any = { NumNode: lambda self, ops, ctx: UOp.const(dtypes.int, self.b AndNode: lambda self,ops,ctx: functools.reduce(lambda a,b: a*b.render(ops, ctx), self.nodes[1:], self.nodes[0].render(ops,ctx)) } if getenv("UOP_IS_SYMBOLIC"): - # TODO: change this once UOps is ready to replace symbolic. note: this doesn't work for variable shapetrackers now + # TODO: change this once UOps is ready to replace symbolic def _uop_view(view:View, idxs:List[UOp], vexpr:UOp) -> Tuple[UOp, UOp]: # TODO: dtypes.realint iexpr = variable_to_uop(view.offset)