Skip to content

Commit

Permalink
Misc updates (pytorch#1868)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: pytorch#1868

- Add better logging for failed Python import test

- Add more regex patterns to .gitignore

Reviewed By: sryap

Differential Revision: D47345742

fbshipit-source-id: be2ca19c1c03d8b6c14836434c79f6ebeea7c3a5
  • Loading branch information
q10 authored and facebook-github-bot committed Jul 11, 2023
1 parent 372c62e commit 0b589b8
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/scripts/utils_base.bash
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ test_python_import () {
if conda run -n "${env_name}" python -c "import ${python_import}"; then
echo "[CHECK] Python package ${python_import} found."
else
echo "[CHECK] Python package ${python_import} not found!"
echo "[CHECK] Python package ${python_import} was not found or is broken!"
return 1
fi
}
Expand Down
86 changes: 86 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,88 @@
# 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.

# Configuration is based on recommendations for C++, CMake, CUDA, and Python
# found in:
# https://github.com/github/gitignore/

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# Distribution / packaging
.Python
build/
_skbuild/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# Prerequisites
*.d

# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
*.so
*.dylib
*.dll

# Fortran module files
*.mod
*.smod

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app

# CUDA outputs
*.i
*.ii
*.gpu
*.ptx
*.cubin
*.fatbin

# CMake outputs
CMakeLists.txt.user
CMakeCache.txt
CMakeFiles
CMakeScripts
Testing
cmake_install.cmake
install_manifest.txt
compile_commands.json
CTestTestfile.cmake
_deps
3 changes: 3 additions & 0 deletions fbgemm_gpu/codegen/embedding_backward_split_template.cu
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,7 @@ Tensor split_embedding{{ "_nobag" if nobag else "" }}_backward_codegen_{{ optimi
}
{%- endif %}
{%- if not dense and optimizer != "none" %}
at::PhiloxCudaState rng_engine_inputs;
if (stochastic_rounding && !std::is_same<emb_t, float>::value) {
Expand All @@ -503,6 +504,8 @@ Tensor split_embedding{{ "_nobag" if nobag else "" }}_backward_codegen_{{ optimi
->philox_cuda_state(4);
}
{%- endif %}
// kMaxElemPerThread is # of elements handled by thread if we use a full warp for a row
// We consider kMaxElemPerThread 1 and 2, and then a multiple of 4.
{%- for kMaxElemPerThread in range(1, max_embedding_dim // (items_per_warp // 4) + 1) %}
Expand Down

0 comments on commit 0b589b8

Please sign in to comment.