Skip to content
This repository was archived by the owner on Sep 30, 2026. It is now read-only.

Add Linux CPU-only CI build and tests - #1222

Closed
scotts wants to merge 19 commits into
pytorch:mainfrom
scotts:ci_cpu
Closed

scotts wants to merge 19 commits into
pytorch:mainfrom
scotts:ci_cpu

Conversation

@scotts

@scotts scotts commented Jan 20, 2026 •

Copy link
Copy Markdown
Contributor

This PR:

  1. Renames existing CUDA build and test to linux_cuda.yml.
  2. Separates the build and Kineto unit tests step.
  3. Creates linux_cpu.yml for CPU-only build and test.

Note that the CPU-only tests run on linux.12xlarge. If we use a smaller system, the PyTorch build will take much longer. Initially, I was using smaller systems while still doing parallel builds and the PyTorch build kept getting killed around 20 minutes in because of OOMs.

I also experimented with not pulling a docker image and trying to use test-infra in a different way. That's still something we should do, but what I was trying was not obviously going to work quickly. We can figure that out later, as I think there's value in getting these CI jobs up as soon as possible.

The CPU-only build and test is also a copy-paste of the existing CUDA tests, with some minor changes. I think that's also fine for now. I think cleaning that up is connected to using test-infra better. Again, I'd like to merge this quickly so we can make sure we have these signals and do this better later (but soon).

Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
@meta-cla meta-cla Bot added the cla signed label Jan 20, 2026
@scotts
scotts marked this pull request as draft January 20, 2026 14:50
@scotts
scotts marked this pull request as ready for review January 21, 2026 18:50
@scotts scotts changed the title Add Linux CPU only CI build and tests Add Linux CPU-only CI build and tests Jan 21, 2026
@jiannanWang

Copy link
Copy Markdown
Contributor

LGTM. Let's wait for the CIs to finish.

@divyanshk divyanshk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

${GPU_FLAG:-} \
--tty \
--detach \
--shm-size=32gb \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this chosen for a specific reason ? I don't know what is the setting in torchdata or codec flows so curious

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pure copy-pasta from the CUDA files. :) I started trying to refactor this a bit, but that become its own thing, and I decided to cut my losses and get this up as-is. I'm not sure if it's worth refactoring this bit in particular, since we may move to using test-infra in a way that they manage the docker container for us.

Comment thread .github/workflows/linux_cpu.yml Outdated
# Note that we are making these CPU-only builds through cmake flags.
docker exec -t -w "/kineto/build_static" "${container_name}" bash -c "
set -eux
cmake -DLIBKINETO_NOCUPTI=1 -DKINETO_LIBRARY_TYPE=static ../libkineto/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add other flags as well ? https://github.com/divyanshk/kineto/blob/main/libkineto/CMakeLists.txt#L90

(not a big fan of this - I can consolidate them later)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In principle, yes, in practice, we get CPU-only builds. I also know those are not available in this docker container. I think we should also verify that we have CPU-only builds, but I'd like that also to be a part of refactoring these later.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ya know what, let's just add the flags. :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related: we might want to define some form of CPU_ONLY flag that we can set that inside the build we error if any GPUs were set, and then explicitly set all known GPU flags to 0.

@meta-codesync

meta-codesync Bot commented Jan 21, 2026

Copy link
Copy Markdown

@scotts has imported this pull request. If you are a Meta employee, you can view this in D91159364.

@meta-codesync

meta-codesync Bot commented Jan 21, 2026

Copy link
Copy Markdown

@scotts merged this pull request in bd02005.

@scotts
scotts deleted the ci_cpu branch January 22, 2026 14:25
meta-codesync Bot pushed a commit that referenced this pull request Jan 30, 2026
Summary:
Depends on #1222.

Pull Request resolved: #1231

Reviewed By: atalman

Differential Revision: D91166410

Pulled By: scotts

fbshipit-source-id: e237b9c22815d9725bf4aa548085f73098939658
ani300 pushed a commit to IBM/kineto-spyre that referenced this pull request Jul 28, 2026
Summary:
Depends on pytorch/kineto#1222.

Pull Request resolved: pytorch/kineto#1231

Reviewed By: atalman

Differential Revision: D91166410

Pulled By: scotts

fbshipit-source-id: e237b9c22815d9725bf4aa548085f73098939658
Signed-off-by: Antoni Viros i Martin <aviros@ibm.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants