more robust imports in heuristics.py and heuristics_provider.py (#2596)
This commit is contained in:
@ -37,7 +37,8 @@ import json
|
||||
import csv
|
||||
|
||||
try:
|
||||
if CUTLASS_IGNORE_PACKAGE:
|
||||
import builtins
|
||||
if hasattr(builtins, "CUTLASS_IGNORE_PACKAGE") and CUTLASS_IGNORE_PACKAGE == True:
|
||||
raise ImportError("Disabling attempt to import cutlass_library")
|
||||
from cutlass_library.library import *
|
||||
from cutlass_library.generator import *
|
||||
|
||||
@ -41,7 +41,13 @@ import logging
|
||||
import ctypes
|
||||
import functools
|
||||
|
||||
from library import DataType, LayoutType
|
||||
try:
|
||||
import builtins
|
||||
if hasattr(builtins, "CUTLASS_IGNORE_PACKAGE") and CUTLASS_IGNORE_PACKAGE == True:
|
||||
raise ImportError("Disabling attempt to import cutlass_library")
|
||||
from cutlass_library.library import DataType, LayoutType
|
||||
except ImportError:
|
||||
from library import DataType, LayoutType
|
||||
|
||||
class MatmulHeuristics:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user