File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66LICENSE file in the root directory of this source tree.
77"""
88
9- from .flashlight_lib_sequence_criterion import (
10- CpuForceAlignmentCriterion ,
11- CpuFullConnectionCriterion ,
12- CpuViterbiPath ,
13- CriterionScaleMode ,
14- )
15-
169
1710have_torch = False
1811try :
19- import torch
2012
2113 have_torch = True
2214except ImportError :
2315 pass
2416
2517if have_torch :
26- from flashlight .lib .sequence .criterion_torch import (
27- ASGLoss ,
28- check_tensor ,
29- create_workspace ,
30- FACFunction ,
31- FCCFunction ,
32- get_cuda_stream_as_bytes ,
33- get_data_ptr_as_bytes ,
34- run_backward ,
35- run_direction ,
36- run_forward ,
37- run_get_workspace_size ,
38- )
18+ pass
Original file line number Diff line number Diff line change 1111
1212class ImportTestCase (unittest .TestCase ):
1313 def test_import_lib_sequence (self ) -> None :
14- from flashlight .lib .sequence import criterion
15- from flashlight .lib .sequence .criterion import (
16- CpuForceAlignmentCriterion ,
17- CpuFullConnectionCriterion ,
18- CpuViterbiPath ,
19- CriterionScaleMode ,
20- )
2114
2215 if os .getenv ("USE_CUDA" , "OFF" ).upper () not in [
2316 "OFF" ,
@@ -26,11 +19,7 @@ def test_import_lib_sequence(self) -> None:
2619 "FALSE" ,
2720 "N" ,
2821 ]:
29- from flashlight .lib .sequence .flashlight_lib_sequence_criterion import (
30- CudaForceAlignmentCriterion ,
31- CudaFullConnectionCriterion ,
32- CudaViterbiPath ,
33- )
22+ pass
3423 else :
3524 logging .info ("Flashlight Sequence bindings built without CUDA" )
3625
You can’t perform that action at this time.
0 commit comments