[TensorExpr] Remove `dtype_` and add `buf_` fields to `CodeGen::BufferArg`. (#57382)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/57382
`BufferArg` is used to describe parameters passed to the codegen: it
indicates whether the parameter is a var or a buf and holds a pointer to
the corresponding var/buf. Both var and buf contain dtype, and thus
duplicating it in BufferArg is unnecessary - we can always get it from
the var/buf. Hence we're removing dtype_ field from BufferArg in this
PR. We're also adding a `buf_` field here: this is done so that
BufferArg truly has all the info about the parameter.
Test Plan: Imported from OSS
Reviewed By: bertmaher
Differential Revision: D28128329
Pulled By: ZolotukhinM
fbshipit-source-id: c03bff54bc6860f7ac6edfcb42ce6a82d8309589
Author
Mikhail Zolotukhin