CUTLASS 3.5.1 (#1623)

* CUTLASS 3.5.1

* updates, optimizations, fixes
This commit is contained in:
Vijay Thakkar
2024-07-29 08:46:24 -04:00
committed by GitHub
parent 56b46e2d13
commit be60a0b272
312 changed files with 19793 additions and 6775 deletions

View File

@ -506,6 +506,7 @@ class Manifest:
self.operations_enabled = []
self.selected_kernels = []
self.ignore_kernel_names = []
self.exclude_kernel_names = []
self.compute_capabilities = [50,]
self.curr_build_dir = '.'
self.filter_by_cc = True
@ -546,6 +547,7 @@ class Manifest:
self.kernel_names = [x for x in args.kernels.split(',') if x != '']
self.ignore_kernel_names = [x for x in args.ignore_kernels.split(',') if x != '']
self.exclude_kernel_names = [x for x in args.exclude_kernels.split(',') if x != '']
if args.kernel_filter_file is None:
self.kernel_filter_list = []
@ -612,41 +614,54 @@ class Manifest:
if len(self.operations_enabled) and not operation.operation_kind in self.operations_enabled:
return False
name = operation.procedural_name()
# eliminate duplicates
if operation.procedural_name() in self.operations_by_name.keys():
if name in self.operations_by_name.keys():
return False
# Filter based on list of valid substrings
if len(self.kernel_names):
name = operation.procedural_name()
enabled = False
# compare against the include list
for name_substr in self.kernel_names:
if self._filter_string_matches(name_substr, name):
_LOGGER.debug("Kernel {kernel} included due to filter string '{filt}'.".format(
kernel = operation.procedural_name(),
filt = name_substr))
_LOGGER.debug(f"Kernel {name} included due to filter string '{name_substr}'.")
enabled = True
break
else:
_LOGGER.debug(f"Kernel {name} NOT included due to not matching '{name_substr}'.")
# compare against the exclude list
for name_substr in self.ignore_kernel_names:
if self._filter_string_matches(name_substr, name):
_LOGGER.debug("Kernel {kernel} ignored due to filter string '{filt}'.".format(
kernel = operation.procedural_name(),
filt = name_substr))
_LOGGER.debug(f"Kernel {name} ignored due to filter string '{name_substr}'.")
enabled = False
break
else:
_LOGGER.debug(f"Kernel {name} NOT ignored due to not matching '{name_substr}'.")
if len(self.kernel_filter_list) > 0:
if self.filter_out_kernels(operation.procedural_name(), self.kernel_filter_list):
_LOGGER.debug("Kernel {kernel} matched via kernel filter file.".format(kernel = operation.procedural_name()))
enabled = True
else:
_LOGGER.debug("Kernel {kernel} culled due to no match in kernel filter file.".format(kernel = operation.procedural_name()))
enabled = False
if self.filter_out_kernels(name, self.kernel_filter_list):
_LOGGER.debug(f"Kernel {name} matched via kernel filter file.")
enabled = True
else:
_LOGGER.debug(f"Kernel {name} culled due to no match in kernel filter file.")
enabled = False
# CUTLASS_LIBRARY_IGNORE_KERNELS ("ignore" list) only takes effect
# if CUTLASS_LIBRARY_KERNELS was specified.
# Changing that would break backwards compatibility.
# Thus, CUTLASS has introduced the new CMake option CUTLASS_LIBRARY_EXCLUDE_KERNELS,
# that always takes effect, whether or not CUTLASS_LIBRARY_KERNELS was specified.
for name_substr in self.exclude_kernel_names:
if self._filter_string_matches(name_substr, name):
_LOGGER.debug(f"Kernel {name} excluded due to filter string '{name_substr}'.")
enabled = False
break
else:
_LOGGER.debug(f"Kernel {name} NOT excluded due to not matching '{name_substr}'.")
# TODO: filter based on compute data type
return enabled