    def __enter__(self):
        """Enter the target context manager.

        This will set CURRENT_TARGET to this target.

        Raises
        ------
        RuntimeError
            If CURRENT_TARGET is already set, this will raise a RuntimeError.
        """
        self._load_profile_cache()
        global CURRENT_TARGET
        if CURRENT_TARGET is not None:
            raise RuntimeError("Target has been set.")
        assert self._target_type > 0
        CURRENT_TARGET = self
Enter the target context manager.

This will set CURRENT_TARGET to this target.

Raises
------
RuntimeError
If CURRENT_TARGET is already set, this will raise a RuntimeError.
python/aitemplate/backend/target.py