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

[fbgemm_gpu] Fix mpmath dependency #2356

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/scripts/utils_build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,11 @@ install_build_tools () {

echo "[INSTALL] Installing build tools ..."
# NOTES:
# - Only the openblas package will install cblas.h directly into
# $CONDA_PREFIX/include directory
# - ncurses is needed to silence bad libtinfo6.so errors for ROCm+Clang builds
#
# - Only the openblas package will install <cblas.h> directly into
# $CONDA_PREFIX/include directory, which is required for FBGEMM tests
#
# - ncurses is needed to silence libtinfo6.so errors for ROCm+Clang builds
#
# shellcheck disable=SC2086
(exec_with_retries 3 conda install ${env_prefix} -c conda-forge -y \
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/fbgemm_gpu_ci_rocm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,6 @@ jobs:
- name: Create Conda Environment
run: . $PRELUDE; create_conda_environment $BUILD_ENV ${{ matrix.python-version }}

- name: Install Build Tools
run: . $PRELUDE; install_build_tools $BUILD_ENV

- name: Install PyTorch-ROCm Nightly
run: . $PRELUDE; install_pytorch_pip $BUILD_ENV nightly rocm/${{ matrix.rocm-version }}

Expand Down
6 changes: 6 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.

breathe
sphinx_rtd_theme
6 changes: 6 additions & 0 deletions fbgemm_gpu/docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.

# Note: Sphinx 7+ currently runs into an `Undefinederror("'style' is undefined")`
# We should eventually move to Sphinx 7+ to resolve
# https://github.com/sphinx-doc/sphinx/issues/1514
Expand Down
21 changes: 17 additions & 4 deletions fbgemm_gpu/docs/src/fbgemm_gpu-development/TestInstructions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,21 @@ Testing FBGEMM_GPU
The tests (in the ``fbgemm_gpu/test/`` directory) and benchmarks (in the
``fbgemm_gpu/bench/`` directory) provide good examples on how to use FBGEMM_GPU.

FBGEMM_GPU Tests
~~~~~~~~~~~~~~~~
Setup the FBGEMM_GPU Test Environment
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

After an environment is available from building / installing the FBGEMM_GPU
package, additional packages need to be installed for tests to run correctly:

.. code:: sh

# !! Run inside the Conda environment !!

# From the /fbgemm_gpu/ directory
python -m pip install -r requirements.txt

Running FBGEMM_GPU Tests
~~~~~~~~~~~~~~~~~~~~~~~~

To run the tests after building / installing the FBGEMM_GPU package:

Expand Down Expand Up @@ -60,8 +73,8 @@ For ROCm machines, testing against a ROCm GPU needs to be enabled with

python -m pytest -v -rsx -s -W ignore::pytest.PytestCollectionWarning split_table_batched_embeddings_test.py

FBGEMM_GPU Benchmarks
~~~~~~~~~~~~~~~~~~~~~
Running FBGEMM_GPU Benchmarks
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

To run the benchmarks:

Expand Down
13 changes: 13 additions & 0 deletions fbgemm_gpu/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.

# NOTES:
#
# - A fixed version of mpmath is needed to work around an AttributeError; see:
# * https://github.com/nod-ai/SHARK/issues/2095
# * https://github.com/jianyicheng/mase-docker/pull/9

cmake
hypothesis
jinja2
mpmath==1.3.0
ninja
numpy
scikit-build
Expand Down
Loading