o
    Gi                     @   s  d dl mZ d dlZddlmZ ddlmZ ejdd  edd  kr1e	de dej d	ed
krNej
jdurNej
jekrNe	de dej
j dd dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddl m!Z! dd l m Z  dd!lm"Z" dd"lm#Z# dd#lm$Z$ dd$l%m&Z& dd%l%m'Z' dd&l%m(Z( dd'l%m)Z) dd(l%m*Z* dd)l%m+Z+ dd*l%m,Z, dd+l%m-Z- dd,l%m.Z. dd-l%m/Z/ dd.l%m0Z0 dd/l%m1Z1 dd0l%m2Z2 dd1l%m3Z3 dd2l%m4Z4 dd3l%m5Z5 dd4l%m6Z6 dd5l%m7Z7 dd6l%m8Z8 dd7l%m9Z9 dd8l%m:Z: dd9l%m;Z; dd:l%m<Z< dd;l%m=Z= dd<l%m>Z> dd=l%m?Z? dd>l%m@Z@ dd?l%mAZA dd@l%mBZB ddAlCmDZE ddBlFmGZG ddClFmHZH ddDlImJZJ ddElImIZI ddFlKmLZL ddGlMmNZN ddHlMmOZO ddIlPmQZQ ddJlPmRZR ddKlPmSZS ddLlPmTZT ddMlPmUZU ddNlVmWZW ddOlVmXZX ddPlVmYZY ddQlZm[Z[ ddRlZm\Z\ ddSlZm]Z] ddTlZm^Z^ ddUlZm_Z_ ddVlZm`Z` ddWlZmaZa ddXlZmZZZ ddYlZmbZb ddZlZmcZc dd[lZmdZd dd\lemfZf dd]lmgZg dd^lmhZh dd_lmiZi dd`lmjZj ddalmkZk ddAlmDZD ddblmlZl ddclmmZm dddlmnZn ddelmoZo d dflpmqZq ddglrmsZs ddhlrmtZt ddilrmuZu eevjwdj dk Zx[dlZydS )m    )PathN   )k2_torch_cuda_version)k2_torch_version+zk2 was built using PyTorch z
But you are using PyTorch z
 to run it zk2 was built using CUDA z
But you are using CUDA z to run it.)DeterminizeWeightPushingType)simple_ragged_index_select)swoosh_l)swoosh_l_forward)swoosh_l_forward_and_deriv)swoosh_r)swoosh_r_forward)swoosh_r_forward_and_deriv)RaggedShape)RaggedTensor)autograd)autograd_utils)dense_fsa_vec)fsa)utils)intersect_dense)intersect_dense_pruned)CtcLoss)ctc_loss)DenseFsaVec)convert_dense_to_fsa_vec)Fsa)add_epsilon_self_loops)arc_sort)closure)compose)connect)	ctc_graph)ctc_topo)determinize)expand_ragged_attributes)	intersect)intersect_device)invert)levenshtein_alignment)levenshtein_graph)
linear_fsa)linear_fsa_with_self_loops)
linear_fst)linear_fst_with_self_loops)prune_on_arc_post)random_paths)remove_epsilon)!remove_epsilon_and_add_self_loops)remove_epsilon_self_loops)replace_fsa)reverse)shortest_path)top_sort)trivial_graph)union)to_str)"joint_mutual_information_recursion)mutual_information_recursion)MWERLoss)	mwer_loss)Nbest)DecodeStateInfo)OnlineDenseIntersecter)cat)compose_arc_maps)	index_add)	index_fsa)index_select)RnntDecodingConfig)RnntDecodingStream)RnntDecodingStreams)do_rnnt_pruning)get_rnnt_logprobs)get_rnnt_logprobs_joint)get_rnnt_logprobs_pruned)get_rnnt_logprobs_smoothed)get_rnnt_prune_ranges) get_rnnt_prune_ranges_deprecated)	rnnt_loss)rnnt_loss_pruned)rnnt_loss_simple)rnnt_loss_smoothed)SymbolTable)create_fsa_vec)create_sparse)is_rand_equivalent)get_best_matching_stats)to_dot)to_str_simple)	to_tensor)
random_fsa)random_fsa_vec)	with_cuda)get_aux_labels)get_lattice)one_best_decodingsharecmakez1.23.4)zpathlibr   _Pathtorchtorch_versionr   r   __version__splitImportErrorversioncuda_k2r   r	   r
   r   r   r   r   r   raggedr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   fsa_algor   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   fsa_propertiesr;   properties_to_strmutual_informationr<   r=   r?   r>   nbestr@   online_dense_intersecterrA   rB   opsrC   rD   rE   rF   rG   rnnt_decoderH   rI   rJ   rR   rK   rL   rM   rN   rO   rP   rQ   rS   rT   rU   symbol_tablerV   rW   rX   rY   rZ   r[   r\   r]   r^   r_   _k2.versionr`   decodera   rb   rc   __file__parentcmake_prefix_path__dev_version__ r   r   ?/home/ubuntu/.local/lib/python3.10/site-packages/k2/__init__.py<module>   s    