def create(
        barrier_storage: cute.Pointer,
        num_stages: Int32,
        producer_group: CooperativeGroup,
        consumer_group: CooperativeGroup,
        tx_count: int,
        init_wait: bool = True,
    ):
        """
        This helper function computes any necessary attributes and returns an instance of PipelineTmaAsync.
        :param barrier_storage: Pointer to the smem address for this pipeline's mbarriers
        :type barrier_storage: cute.Pointer
        :param num_stages: Number of buffer stages for this pipeline
        :type num_stages: Int32
        :param producer_group: CooperativeGroup for the producer agent
        :type producer_group: CooperativeGroup
        :param consumer_group: CooperativeGroup for the consumer agent
        :type consumer_group: CooperativeGroup
        :param tx_count: Number of bytes expected to be written to the transaction barrier for one stage
        :type tx_count: int
        """
        producer_type = _PipelineOp.TmaLoad
        consumer_type = _PipelineOp.AsyncThread
        producer = (producer_type, producer_group)
        consumer = (consumer_type, consumer_group)
        sync_object_array_full = PipelineAsync._make_sync_object_array(
            barrier_storage.align(min_align=8), num_stages, producer, tx_count
        )
        sync_object_array_empty = PipelineAsync._make_sync_object_array(
            barrier_storage.align(min_align=8) + num_stages, num_stages, consumer
        )
        dst_rank = None
        producer_mask = None
        if init_wait:
            pipeline_init_wait()
        return PipelineTmaAsyncNoCluster(
            sync_object_array_full,
            sync_object_array_empty,
            num_stages,
            producer_mask,
            dst_rank,
        )

        This helper function computes any necessary attributes and returns an instance of PipelineTmaAsync.
        :param barrier_storage: Pointer to the smem address for this pipeline's mbarriers
        :type barrier_storage: cute.Pointer
        :param num_stages: Number of buffer stages for this pipeline
        :type num_stages: Int32
        :param producer_group: CooperativeGroup for the producer agent
        :type producer_group: CooperativeGroup
        :param consumer_group: CooperativeGroup for the consumer agent
        :type consumer_group: CooperativeGroup
        :param tx_count: Number of bytes expected to be written to the transaction barrier for one stage
        :type tx_count: int
        
flash_attn/cute/pipeline.py