adityasingh2400 commented on PR #20092:
URL: https://github.com/apache/tvm/pull/20092#issuecomment-5197806839

   `cpu/pr-head` went red on dd1477d and the cause was my own test, not the 
frontend change. Fixed in 829262a.
   
   The failure was a single test out of the run:
   
   ```
   FAILED 
tests/python/relax/test_frontend_onnx.py::test_shape_unknown_rank_input
     - AttributeError: 'Var' object has no attribute 'struct_info'
   = 1 failed, 10970 passed, 616 skipped, 57 xfailed, 6 xpassed
   ```
   
   It reproduced identically on both test shards, and the Build stage itself 
passed, so this was the assertion and not the conversion.
   
   I wrote the assertion as `params[0].struct_info`, which is not the API on 
this base. `struct_info` does not appear anywhere under `python/tvm/relax` 
here, since Relax vars carry a `Type`. So the line raised before it checked 
anything. It now reads `params[0].ty`, which exposes the same two fields:
   
   ```python
   data_ty = tvm_model["main"].params[0].ty
   assert data_ty.shape is None
   assert data_ty.ndim == -1
   ```
   
   That matches how existing tests read it, for example `arg.ty.dtype` further 
down this same file and `before.params[0].ty.shape` in 
`test_bind_symbolic_vars.py`. It also lines up with 
`relax.TensorType.__init__`, where an omitted shape stays `None` and `ndim` 
defaults to `-1`, which is exactly what `_new_var` now receives for an input 
with no shape field.
   
   Being clear about what I verified: I do not have a TVM build in this 
environment, so I could not run the test locally, and I am relying on CI for 
that. What I did check is that `.ty` is the accessor used by passing tests on 
this base, that `TensorType` leaves `shape` as `None` and `ndim` at `-1` for 
this input, and that the change is limited to the three assertion lines with no 
formatting drift.
   
   The frontend change from dd1477d is untouched, and `arm`, `gpu`, `docker`, 
and `wasm` were all green on that commit.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to