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

Pf buildbot #552

Merged
merged 3 commits into from
Mar 21, 2022
Merged

Pf buildbot #552

merged 3 commits into from
Mar 21, 2022

Conversation

pcf000
Copy link
Contributor

@pcf000 pcf000 commented Mar 15, 2022

Gather the buildbot setup files under mlir/utils/buildbot so they don't get lost. They're adapted from files in llvm-zorg/buildbot/google/docker, but don't quite fit there.

Start the buildbot on the intended worker host with

git clone https://github.com/ROCmSoftwarePlatform/llvm-project-mlir.git
cd ./llvm-project-mlir/mlir/utils/buildbot
export BUILDBOT_PORT=9994
export BUILDBOT_MASTER=lab.llvm.org
./build-run.sh mlir-rocm-mi200 `pwd`/mlir-rocm-mi200

build-run.sh is in this review. It will build a docker image based on rocm/mlir:rocm5.0-latest using the Dockerfile here, culminating in running run.sh to start the buildbot worker in a docker container. The worker will connect to the master and listen for commands; the worker password is in the file named token. The container will persist, keeping its data in a couple of docker volumes, and will try to restart if the system is rebooted.

@pcf000
Copy link
Contributor Author

pcf000 commented Mar 15, 2022

There's also a patch needed to the llvm-zorg repo, which controls invocations of the buildbots from lab.llvm.org. In buildbot terms, this patch adds our buildbot to the configuration of the master, while the changes to llvm-project-mlir are for our buildbot worker.

llvm-zorg-patch.txt

There are three hunks in the patch: one tells the command we want, a cmake of check-mlir with the ROCM flags on; one adds an email notification for failures; one adds our worker to the list.

ARGS+=" -e BUILDBOT_MASTER=${BUILDBOT_MASTER}"
fi

# Proxy needed on lockhart hosts.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This script is just like the one in llvm-zorg up to this point, where we set up a proxy for lockhart hosts (so the worker can read from github.com) and then run the docker image with access to the GPU and with useful options.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Note to self for tomorrow: pass on how to talk to GitHub from Lockhart tomorrow

RUN chmod a+rx /home/buildbot/run.sh

USER buildbot
ENV WORKER_NAME="mlir-rocm-mi200"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Mostly the same as the one I'm adapting from llvm-zorg, except for name changes.


# Set up buildbot host and maintainer info.
mkdir -p "${WORKER_NAME}/info/"
echo "dl.mlse.buildbot@amd.com" > "${WORKER_NAME}/info/admin"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Email distribution list in case of problems.

@@ -0,0 +1 @@
rocmmlir22
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Password for the worker account. Will be sent by separate email to the buildbot-master administrator when we're ready to start.

@pcf000 pcf000 marked this pull request as ready for review March 15, 2022 18:25
Copy link
Collaborator

@krzysz00 krzysz00 left a comment

Choose a reason for hiding this comment

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

One style nitpick, otherwise LGTM

runproxy=''
fi

docker build ${buildproxy} -t "${IMAGE_NAME}:latest" .
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we want to go ahead and make the proxy vars all caps to match the rest of the style?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought at first that that was only for the ones passed to the environment, but no, it's all of them, so I updated.

@pcf000 pcf000 merged commit 020da5c into miopen-dialect Mar 21, 2022
@pcf000 pcf000 deleted the pf-buildbot branch March 21, 2022 16:10
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.

2 participants