ext_utils

class CMakeExtension(name, source_dir=None)[source]

Bases: setuptools.extension.Extension

build_with_command(ext_builder)[source]

Custom build_ext.build_extension in Extension instead of Command. ext_builder is the instance of build_ext command.

get_target_filename()[source]

The file names of libraries. Currently only support one library for one extension.

get_output_filename()[source]

The file names of outputs, which mostly is the same with get_target_filename.

class FasterTransformerExtension(name, source_dir=None, need_parallel=False)[source]

Bases: paddlenlp.ops.ext_utils.CMakeExtension

build_with_command(ext_builder)[source]

Custom build_ext.build_extension in Extension instead of Command. ext_builder is the instance of build_ext command.

get_target_filename()[source]

The file names of libraries. Currently only support one library for one extension.

get_output_filename()[source]

The file names of outputs, which mostly is the same with get_target_filename.

class BuildExtension(*args, **kwargs)[source]

Bases: paddle.utils.cpp_extension.cpp_extension.BuildExtension

Support both CppExtention of Paddle and custom extensions of PaddleNLP.