Skip to content

Providers

ArchSpecInfo

ArchSpecInfo(stage1_arch, stage2_archs)

Provides the information of how GPU compilation is carried out of a single virtual architecture.

FIELDS

Name Description
stage1_arch A virtual architecture, str, arch number only
stage2_archs A list of virtual or gpu architecture, list of Stage2ArchInfo

CudaArchsInfo

CudaArchsInfo(arch_specs)

Provides a list of CUDA archs to compile for.

Read the whole Chapter 5 of CUDA Compiler Driver NVCC Reference Guide if more detail is needed.

FIELDS

Name Description
arch_specs A list of ArchSpecInfo

CudaInfo

Provides cuda build artifacts that can be consumed by device linking or linking process.

This provider is analog to CcInfo but only contains necessary information for linking in a flat structure. Objects are grouped by direct and transitive, because we have no way to split them again if merged a single depset.

FIELDS

Name Description
defines A depset of strings. It is used for the compilation during device linking.
objects A depset of objects. Direct artifacts of the rule.
pic_objects A depset of position indepentent code objects. Direct artifacts of the rule.
rdc_objects A depset of relocatable device code objects. Direct artifacts of the rule.
rdc_pic_objects A depset of relocatable device code and position indepentent code objects. Direct artifacts of the rule.
archive_objects A depset of rdc objects. cuda_objects only. Gathered from the transitive dependencies for archiving.
archive_pic_objects A depset of rdc pic objects. cuda_objects only. Gathered from the transitive dependencies for archiving.
archive_rdc_objects A depset of rdc objects. cuda_objects only. Gathered from the transitive dependencies for archiving or device linking.
archive_rdc_pic_objects A depset of rdc pic objects. cuda_objects only. Gathered from the transitive dependencies for archiving or device linking.
dlink_rdc_objects A depset of rdc objects. cuda_library only. Gathered from the transitive dependencies for device linking.
dlink_rdc_pic_objects A depset of rdc pic objects. cuda_library only. Gathered from the transitive dependencies for device linking.

CudaToolchainConfigInfo

Provides the information of what the toolchain is and how the toolchain is configured.

FIELDS

Name Description
action_configs A list of action_configs.
artifact_name_patterns A list of artifact_name_patterns.
cuda_toolkit CudaToolkitInfo
features A list of features.
toolchain_identifier nvcc or clang

CudaToolkitInfo

Provides the information of CUDA Toolkit.

FIELDS

Name Description
path string of path to cuda toolkit root
version_major int of the cuda toolkit major version, e.g, 11 for 11.6
version_minor int of the cuda toolkit minor version, e.g, 6 for 11.6
nvlink File to the nvlink executable
link_stub File to the link.stub file
bin2c File to the bin2c executable
fatbinary File to the fatbinary executable

Stage2ArchInfo

Stage2ArchInfo(arch, virtual, gpu, lto)

Provides the information of how the stage 2 complation is carried out.

One and only one of virtual, gpu and lto must be set to True. For example, if arch is set to 80 and virtual is True, then a ptx embedding process is carried out for compute_80. Multiple Stage2ArchInfo can be used for specifying how a stage 1 result is transformed into its final form.

FIELDS

Name Description
arch str, arch number
virtual bool, use virtual arch, default False
gpu bool, use gpu arch, default False
lto bool, use lto, default False