Skip to content

Commit 60d0a8a

Browse files
committed
[fbgemm_gpu] Fix mpmath dependency
- Fix mpmath dependency to allow tests to pass again; see DeepWok/mase-docker#9 nod-ai/SHARK-Studio#2095
1 parent b584523 commit 60d0a8a

File tree

6 files changed

+47
-10
lines changed

6 files changed

+47
-10
lines changed

.github/scripts/utils_build.bash

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,11 @@ install_build_tools () {
247247

248248
echo "[INSTALL] Installing build tools ..."
249249
# NOTES:
250-
# - Only the openblas package will install cblas.h directly into
251-
# $CONDA_PREFIX/include directory
252-
# - ncurses is needed to silence bad libtinfo6.so errors for ROCm+Clang builds
250+
#
251+
# - Only the openblas package will install <cblas.h> directly into
252+
# $CONDA_PREFIX/include directory, which is required for FBGEMM tests
253+
#
254+
# - ncurses is needed to silence libtinfo6.so errors for ROCm+Clang builds
253255
#
254256
# shellcheck disable=SC2086
255257
(exec_with_retries 3 conda install ${env_prefix} -c conda-forge -y \

.github/workflows/fbgemm_gpu_ci_rocm.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,6 @@ jobs:
178178
- name: Create Conda Environment
179179
run: . $PRELUDE; create_conda_environment $BUILD_ENV ${{ matrix.python-version }}
180180

181-
- name: Install Build Tools
182-
run: . $PRELUDE; install_build_tools $BUILD_ENV
183-
184181
- name: Install PyTorch-ROCm Nightly
185182
run: . $PRELUDE; install_pytorch_pip $BUILD_ENV nightly rocm/${{ matrix.rocm-version }}
186183

docs/requirements.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
1+
# Copyright (c) Meta Platforms, Inc. and affiliates.
2+
# All rights reserved.
3+
#
4+
# This source code is licensed under the BSD-style license found in the
5+
# LICENSE file in the root directory of this source tree.
6+
17
breathe
28
sphinx_rtd_theme

fbgemm_gpu/docs/requirements.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# Copyright (c) Meta Platforms, Inc. and affiliates.
2+
# All rights reserved.
3+
#
4+
# This source code is licensed under the BSD-style license found in the
5+
# LICENSE file in the root directory of this source tree.
6+
17
# Note: Sphinx 7+ currently runs into an `Undefinederror("'style' is undefined")`
28
# We should eventually move to Sphinx 7+ to resolve
39
# https://github.com/sphinx-doc/sphinx/issues/1514

fbgemm_gpu/docs/src/fbgemm_gpu-development/TestInstructions.rst

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,21 @@ Testing FBGEMM_GPU
44
The tests (in the ``fbgemm_gpu/test/`` directory) and benchmarks (in the
55
``fbgemm_gpu/bench/`` directory) provide good examples on how to use FBGEMM_GPU.
66

7-
FBGEMM_GPU Tests
8-
~~~~~~~~~~~~~~~~
7+
Setup the FBGEMM_GPU Test Environment
8+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9+
10+
After an environment is available from building / installing the FBGEMM_GPU
11+
package, additional packages need to be installed for tests to run correctly:
12+
13+
.. code:: sh
14+
15+
# !! Run inside the Conda environment !!
16+
17+
# From the /fbgemm_gpu/ directory
18+
python -m pip install -r requirements.txt
19+
20+
Running FBGEMM_GPU Tests
21+
~~~~~~~~~~~~~~~~~~~~~~~~
922

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

@@ -60,8 +73,8 @@ For ROCm machines, testing against a ROCm GPU needs to be enabled with
6073
6174
python -m pytest -v -rsx -s -W ignore::pytest.PytestCollectionWarning split_table_batched_embeddings_test.py
6275
63-
FBGEMM_GPU Benchmarks
64-
~~~~~~~~~~~~~~~~~~~~~
76+
Running FBGEMM_GPU Benchmarks
77+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6578

6679
To run the benchmarks:
6780

fbgemm_gpu/requirements.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
1+
# Copyright (c) Meta Platforms, Inc. and affiliates.
2+
# All rights reserved.
3+
#
4+
# This source code is licensed under the BSD-style license found in the
5+
# LICENSE file in the root directory of this source tree.
6+
7+
# NOTES:
8+
#
9+
# - A fixed version of mpmath is needed to work around an AttributeError; see:
10+
# * https://github.com/nod-ai/SHARK/issues/2095
11+
# * https://github.com/jianyicheng/mase-docker/pull/9
12+
113
cmake
214
hypothesis
315
jinja2
16+
mpmath==1.3.0
417
ninja
518
numpy
619
scikit-build

0 commit comments

Comments
 (0)