K i NddlmZmZddlmZddlmZddlm Z dejjiZ ejjejjdZej"j$ej"j&dZej*j,ej*j.dZej2j4ej2j6ej2j8ej2j:ej2j<ej2j>ej2j@ej2jBej2jDd Z#Gd d e Z$e$jJe$jLe$jNe$jPd Z)ed GddZ*ed Gdde*Z+ed Gdde*Z,ed Gdde,Z-ed Gdde,Z.y)) dataclassfield)proton)List)Enumcycle)circularflush)sharedglobal)none selective) ctawarpwarp_2warp_4warp_8 warp_group warp_group_2 warp_group_4 warp_group_8c"eZdZdZdZdZdZdZy)Optimize time_shift sched_storessched_barriersclock32c|jS)N)valueselfs Z/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/triton/profiler/mode.py__str__zOptimize.__str__*s zzN)__name__ __module__ __qualname__ TIMESHIFT SCHED_STORESSCHED_BARRIERSCLOCK32r#r$r"rr$sI!L%NGr$r)rrrrT)frozenceZdZUeed<y)BaseModenameN)r%r&r'str__annotations__r,r$r"r/r/6s Ir$r/cFeZdZUeddZeed<dZeed<dZ dZ y ) PCSampling pcsamplingFdefaultinitr0iintervalc8|jdkr tdy)Nrz$Interval must be a positive integer.)r9 ValueErrorr s r" __post_init__zPCSampling.__post_init__@s ==A CD D r$c8|jd|jS)Nz :interval=)r0r9r s r"r#zPCSampling.__str__Ds))Jt}}o66r$N) r%r&r'rr0r1r2r9intr<r#r,r$r"r4r4;s(l7D#7HcE7r$r4ceZdZUdZej j Zej ed<ejjZ ejed<dZ e ed<ejjZejed<ej"j$Zej"ed<ej(j*Zej(ed<d Zeed <ee Zeeed <d ZdZy)InstrumentationModezFCommon base class for instrumentation modes with shared configuration. metric_typesampling_strategysampling_options granularitybuffer_strategy buffer_typer buffer_size)default_factory optimizationsc Tdtfdtfdtfdtfdtfg}|D]Q\}}t ||}t |ts#||vrtd|d|tj||||St |d}t |trt|d kDr-|jd Dcgc]}|jc}ng}|D]}|tvs td |tj|d|Dcgc] }t| c}yycc}wcc}w) NrArBrErFrGzUnknown z: rJr,zUnknown optimization: ) metric_typessampling_strategies granularitiesbuffer_strategies buffer_typesgetattr isinstancer1r;object __setattr__lensplitstriprJ)r!mappings field_namelookupr values_strvaluess r"r<z!InstrumentationMode.__post_init__TsAL ) "5 6 M *  1 2 L )  #+ D JD*-E%%&$x |2eW%EFF""4VE]C  DT?3 j# &KNz?]^K^1A1A#1FGekkmGdfF G -$'=eW%EFF G   t_Y_6`PU}U7K6` a 'G7as 9D D% cHdj|jDcgc] }t|c}}|jd|jd|j d|j d|jd|jd|jd|jd |Scc}w) NrLz :metric_type=z:sampling_strategy=z:sampling_options=z :granularity=z:buffer_strategy=z :buffer_type=z :buffer_size=z:optimizations=) joinrJr1r0rArBrDrErFrGrH)r!optoptimizations_strs r"r#zInstrumentationMode.__str__lsHH$:L:L%M3c#h%MN99+]4+;+;*<rlistrJrrr<r#r,r$r"r@r@HsP-:-F-F-L-LK**L9F9X9X9]9]}66]c-:-F-F-K-KK**K5B5R5R5[5[O]22[-:-F-F-M-MK**MK$)$$?M4>?b0Vr$r@c,eZdZUeddZeed<y)Defaultr7Fr6r0Nr%r&r'rr0r1r2r,r$r"rprptsie4D#4r$rpc,eZdZUeddZeed<y)MMAmmaFr6r0Nrqr,r$r"rsrsyse%0D#0r$rsN)/ dataclassesrrtriton._C.libtritonrrctypingrenumrrdrerMrjrkFLUSHrPrlrmGLOBALrQrfrg SELECTIVErNrhCTAriWARP_2WARP_4WARP_8 WARP_GROUP WARP_GROUP_2 WARP_GROUP_4 WARP_GROUP_8rOrr(r)r*r+rJr/r4r@rprsr,r$r"rs (722889 --66  * * 0 0 ''..''..  + + 0 000::  $ $ ( (  % % * *''..''..''..++66!--::!--::!--::  t$$))--   $ $ 7 7 7 $(V((V(VV $5!55 $1 11r$