MCPcopy Create free account
hub / github.com/NVIDIA/cutlass / compile

Method compile

python/cutlass_cppgen/op/gemm.py:478–507  ·  view source on GitHub ↗

Emits and compiles the kernel currently specified. If ``tile_description`` and any of the ``alignment`` parameters are set, the kernel will be chosen using this tile description and alignments. Otherwise, a default tile description and alignment will be used.

(self, tile_description: TileDescription = None,
                alignment_A: int = None, alignment_B: int = None, alignment_C: int = None,
                print_module: bool = False)

Source from the content-addressed store, hash-verified

476 return operation
477
478 def compile(self, tile_description: TileDescription = None,
479 alignment_A: int = None, alignment_B: int = None, alignment_C: int = None,
480 print_module: bool = False) -> cutlass_cppgen.backend.GemmOperationUniversal:
481 """
482 Emits and compiles the kernel currently specified. If ``tile_description`` and any
483 of the ``alignment`` parameters are set, the kernel will be chosen using this
484 tile description and alignments. Otherwise, a default tile description and alignment
485 will be used.
486
487 :param tile_description: tile description specifying shapes and operand types to use in the kernel
488 :type tile_description: cutlass_cppgen.backend.TileDescription
489 :param alignment_A: alignment of operand A
490 :type alignment_A: int
491 :param alignment_B: alignment of operand B
492 :type alignment_B: int
493 :param alignment_C: alignment of operand C
494 :type alignment_C: int
495 :param print_module: whether to print the emitted C++ code
496 :type print_module: bool
497
498 :return: operation that was compiled
499 :rtype: cutlass_cppgen.backend.GemmOperationUniversal
500 """
501 self.operation = self.construct(tile_description, alignment_A, alignment_B, alignment_C)
502
503 if print_module:
504 print(self.operation.rt_module.emit())
505
506 compiler.add_module([self.operation,])
507 return self.operation
508
509 def _verify_rank(self, tensor):
510 """

Callers 6

runMethod · 0.95
add_kernel_filterMethod · 0.45
get_kernel_filtersMethod · 0.45
transform_hashed_stringFunction · 0.45
runMethod · 0.45

Calls 4

constructMethod · 0.95
add_moduleMethod · 0.80
printFunction · 0.50
emitMethod · 0.45

Tested by

no test coverage detected