Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Componentized builds for XRT #8706

Merged
merged 1 commit into from
Jan 21, 2025
Merged

Componentized builds for XRT #8706

merged 1 commit into from
Jan 21, 2025

Conversation

stsoe
Copy link
Collaborator

@stsoe stsoe commented Jan 20, 2025

Problem solved by the commit

Ensure that all install targets specify a CMake component.

How problem was solved, alternative solutions (if any) and why they were rejected

XRT currently supports building four packages: base, npu, alveo, and legacy xrt. The package built by XRT is controlled through CMake variables that are either set by build scripts or inferred automatically:

  • XRT_BASE: Builds the base package, which contains everything shared by other packages.
  • XRT_NPU: Builds the npu package with content specific to NPU.
  • XRT_ALVEO: Builds the alveo package with content specific to Alveo.
  • XRT_XRT: Builds the legacy XRT package (default when no other variables are set).

The packages are created by populating CMake components controlled through following symbolic internal CMake variables, which are set to either base, npu, alveo, or xrt depending on which package is built

  • XRT_BASE_COMPONENT: Deployment component for XRT base content. The base component has content that is required by npu, alveo, and xrt packages.
  • XRT_BASE_DEV_COMPONENT: Development component for XRT base content.
  • XRT_COMPONENT: Deployment component for XRT npu, alveo, or legacy xrt packages. This component is dependent on the base component.
  • XRT_DEV_COMPONENT: Development component for XRT npu, alveo, or legacy xrt packages.

This PR ensures that all install targets specify and CMake component and it wires up the symbolic components based on what package is being built.

For the time being, the npu, alveo, and legacy xrt packages all include the base component. This will change when we are ready keep a separate base package and support side-by-side installation of npu and alveo. Also for the time being, all packages combine deployment and development.

Risks (if any) associated the changes in the commit

What has been tested and how, request additional testing if necessary

This PR has been tested building all variants listed above ensuring that the legacy xrt package (and npu package) have the same content as in earlier (or current) XRT releases.

Ensure that all install targets specify a CMake component.

XRT currently supports building four packages: base, npu, alveo, and
legacy xrt. The package built by XRT is controlled through CMake
variables that are either set by build scripts or inferred automatically:
- XRT_BASE: Builds the base package, which contains everything shared by
   other packages.
- XRT_NPU:  Builds the npu package with content specific to NPU.
- XRT_ALVEO:  Builds the alveo package with content specific to Alveo.
- XRT_XRT: Builds the legacy XRT package (default when no other variables are set).

The packages are created by populating CMake components controlled
through following symbolic internal CMake variables, which are set to
either base, npu, alveo, or xrt depending on which package is built
- XRT_BASE_COMPONENT:  Deployment component for XRT base content.  The base component
   has content that is required by npu, alveo, and xrt packages.
- XRT_BASE_DEV_COMPONENT:  Development component for XRT base content.
- XRT_COMPONENT: Deployment component for XRT npu, alveo, or legacy xrt packages.
    This component is dependent on the base component.
- XRT_DEV_COMPONENT: Development compoment for XRT npu, alveo, or legacy xrt packages.

This PR ensures that all install targets specify and CMake component
and it wires up the symbolic components based on what package is being
built.

For the time being, the npu, alveo, and legacy xrt packages all
include the base component. This will change when we are ready keep a
separate base package and support side-by-side installation of npu and
alveo.

This PR has been tested building all variants listed above ensuring
that the legacy xrt package (and npu package) have the same content as
in earlier (or current) XRT releases.

Signed-off-by: Soren Soe <[email protected]>
@stsoe stsoe requested a review from maxzhen January 20, 2025 23:56
@stsoe stsoe merged commit 9f4a3ab into Xilinx:master Jan 21, 2025
20 checks passed
@stsoe stsoe deleted the components branch January 21, 2025 16:02
stsoe added a commit to stsoe/XRT that referenced this pull request Jan 21, 2025
Amend Xilinx#8706. Use dummy value or XRT_DEV_COMPONENT when building only
base component.

Tempoary fix for cpackLin conditionally adding dependencies for
legacy XRT when XRT_DEV_COMPONENT equals "xrt".  We don't want the
dependencies in case of base package so use dummy value to by-pass.

Also, ensure that pcie/linux shim is built only when XRT_BASE is
active.  Linux shim is shared between npu and alveo, hence should be
in base component only.

Signed-off-by: Soren Soe <[email protected]>
stsoe added a commit that referenced this pull request Jan 22, 2025
Amend #8706. Use dummy value or XRT_DEV_COMPONENT when building only
base component.

Tempoary fix for cpackLin conditionally adding dependencies for
legacy XRT when XRT_DEV_COMPONENT equals "xrt".  We don't want the
dependencies in case of base package so use dummy value to by-pass.

Also, ensure that pcie/linux shim is built only when XRT_BASE is
active.  Linux shim is shared between npu and alveo, hence should be
in base component only.

Signed-off-by: Soren Soe <[email protected]>
rchane pushed a commit to rchane/XRT that referenced this pull request Jan 24, 2025
Amend Xilinx#8706. Use dummy value or XRT_DEV_COMPONENT when building only
base component.

Tempoary fix for cpackLin conditionally adding dependencies for
legacy XRT when XRT_DEV_COMPONENT equals "xrt".  We don't want the
dependencies in case of base package so use dummy value to by-pass.

Also, ensure that pcie/linux shim is built only when XRT_BASE is
active.  Linux shim is shared between npu and alveo, hence should be
in base component only.

Signed-off-by: Soren Soe <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant