def add_constant_folding_input(self, tensor: Tensor):
        """
        Handle an input to constant fold
        Handle an input to constant folding, e.g. a constant that is
        no longer part of the main graph
        """
        name = tensor._attrs["name"]

        if tensor._attrs["data"] is None:
            self.set_up_constant_names.append(
                set_value(
                    f'unbound_constant_name_to_idx_["{name}"]',
                    self.unbound_constant_idx,
                )
            )
            original_name = tensor._attrs.get("original_name")
            if original_name is not None:
                self.set_up_constant_original_names.append(
                    set_value(
                        f'constant_name_to_original_name_["{name}"]',
                        f'"{original_name}"',
                    )
                )
            self._record_param_tensor_info(
                tensor,
                self.unbound_constant_idx + self.num_inputs + self.num_outputs,
            )
            self.unbound_constant_idx += 1
            self.set_up_constant_folding_inputs.append(
                f'constant_folding_inputs_.insert("{name}");'
            )
        else:
            self._add_owned_constant(tensor)
            self._codegen_bound_constant(tensor)
            self.set_up_constant_folding_inputs.append(
                f'constant_folding_optional_inputs_.insert("{name}");'
            )

        self._process_dims_for_tensor(tensor)

        Handle an input to constant fold
        Handle an input to constant folding, e.g. a constant that is
        no longer part of the main graph
        
python/aitemplate/backend/codegen.py