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

Invaild option for build_pip_package #62

Open
petronny opened this issue Sep 13, 2023 · 3 comments
Open

Invaild option for build_pip_package #62

petronny opened this issue Sep 13, 2023 · 3 comments

Comments

@petronny
Copy link

petronny commented Sep 13, 2023

In build(),

    bazel-bin/tensorflow/tools/pip_package/build_pip_package --gpu "${srcdir}"/tmprocm

bazel-bin/tensorflow/tools/pip_package/build_pip_package is pointed to tensorflow/tools/pip_package/build_pip_package.sh.

However, build_pip_package.sh --help shows no --gpu option in its usage.

Usage:
./build_pip_package.sh [--src srcdir] [--dst dstdir] [options]
./build_pip_package.sh dstdir [options]

    --src                 prepare sources in srcdir
                              will use temporary dir if not specified

    --dst                 build wheel in dstdir
                              if dstdir is not set do not build, only prepare sources

  Options:
    --project_name <name> set project name to name
    --cpu                 build tensorflow_cpu
    --gpudirect           build tensorflow_gpudirect
    --rocm                build tensorflow_rocm
    --nightly_flag        build tensorflow nightly

Maybe it should be changed to --gpudirect or --rocm now.

And please also consider setting the srcdir for build_pip_package, or else it will use mktemp -d -t tmp.XXXXXXXXXX and break the build when /tmp is not big enough.
I guess "${srcdir}"/tmprocm is for dstdir. So the updated command may be like

bazel-bin/tensorflow/tools/pip_package/build_pip_package --src "${srcdir}"/tmprocm-src --dst "${srcdir}"/tmprocm --rocm
@petronny
Copy link
Author

petronny commented Sep 13, 2023

And tensorflow-rocm and tensorflow-rocm-opt cannot use the same srcdir. So the other one could be tmpoptrocm-src.

@acxz
Copy link
Member

acxz commented Sep 26, 2023

patched with bfe29ff

leaving this patched until we don't see the --gpu option in the [community] package for tensorflow. https://gitlab.archlinux.org/archlinux/packaging/packages/tensorflow/-/blob/main/PKGBUILD?ref_type=heads#L174

@acxz
Copy link
Member

acxz commented Jul 21, 2024

Removing the patch label as the upstream PKGBUILD has removed the usage of build_pip_package and uses wheel instead. As such I have reverted the patch. Of course, we will need to add in this patch (at least for building rocm and optrocm in two separate dirs) later on, but I want to sort out the other issues that we encounter in the build first.

@acxz acxz removed the patched label Jul 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants