(attr_key)
| 168 | if op.attrs and self.include_call_attrs: |
| 169 | |
| 170 | def display_attrs(attr_key): |
| 171 | attr_val = op.attrs[attr_key] |
| 172 | |
| 173 | if isinstance(attr_val, str): |
| 174 | # attrs can be strings but also other types; |
| 175 | # we want to wrap strings in quotes |
| 176 | # (__repr__ would work but it uses single quotes) |
| 177 | attr_val = wrap_quotes(attr_val) |
| 178 | elif isinstance(attr_val, tvm.tirx.IntImm): |
| 179 | if attr_val.dtype == "bool": |
| 180 | attr_val = bool(attr_val.value) |
| 181 | else: |
| 182 | attr_val = int(attr_val.value) |
| 183 | |
| 184 | return f"{wrap_quotes(attr_key)}: {attr_val}" |
| 185 | |
| 186 | fields["attrs"] = self.build_list( |
| 187 | map(display_attrs, op.attrs.keys()), |
nothing calls this directly
no test coverage detected