Skip to content

Commit

Permalink
fix windows build failure
Browse files Browse the repository at this point in the history
  • Loading branch information
chengzeyi committed Nov 12, 2023
1 parent bf3853b commit ccbdeff
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 9 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/wheels_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,13 @@ jobs:
run: |
set -Eeuo pipefail
git config --global --add safe.directory "*"
pip install packaging ninja
version=`cat version.txt`
# Set build version to x.x.x.devYYYYMMDD+torchxxxcu111
torch_version_suffix=torch$(echo ${{ inputs.torch_version }} | sed 's/\.//g')
cuda_version_suffix=${{ steps.cuda_info.outputs.CUDA_VERSION_SUFFIX }}
nightly_tag=$([[ $VERSION_SOURCE == 'tag' ]] && echo '' || echo '.dev'`date +%Y%m%d`)
echo "BUILD_VERSION=$version$nightly_tag+torch$torch_version_suffix$cuda_version_suffix" >> ${GITHUB_ENV}
echo "BUILD_VERSION=$version$nightly_tag+torch$torch_version_suffix$cuda_version_suffix" >> ${GITHUB_OUTPUT}
which ninja
cat ${GITHUB_ENV}
- run: echo "sfast-${BUILD_VERSION}"
- run: echo "release version"
Expand All @@ -142,7 +140,7 @@ jobs:
python: ${{ inputs.python }}

- name: Install dependencies
run: $PY -m pip install wheel setuptools twine -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cu${{ inputs.cuda_short_version }} --no-cache-dir
run: $PY -m pip install wheel setuptools ninja twine -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cu${{ inputs.cuda_short_version }} --no-cache-dir

- name: Build wheel
run: |
Expand Down
2 changes: 1 addition & 1 deletion sfast/csrc/operators/cublas/cublas_gemm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,7 @@ Tensor cublas_lowp_linear_add(const Tensor &input, const Tensor &weight,
}
#endif

void initCUBLASGEMMBindings(Library &m) {
void initCUBLASGEMMBindings(torch::Library &m) {
#if defined(WITH_CUDA)
m.def(
"cublas_lowp_addmm",
Expand Down
2 changes: 1 addition & 1 deletion sfast/csrc/operators/cublas/cublas_gemm.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Tensor cublas_lowp_linear_add(const Tensor &input, const Tensor &weight,
const Tensor &other, const Scalar &alpha = 1);
#endif

void initCUBLASGEMMBindings(Library &m);
void initCUBLASGEMMBindings(torch::Library &m);

} // namespace operators
} // namespace sfast
2 changes: 1 addition & 1 deletion sfast/csrc/operators/cudnn/cudnn_convolution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace operators {

using namespace torch;

void initCUDNNConvolutionBindings(Library &m) {
void initCUDNNConvolutionBindings(torch::Library &m) {
#if defined(WITH_CUDA)
m.def("cudnn_convolution_bias_add",
dispatch(c10::DispatchKey::CompositeImplicitAutograd,
Expand Down
2 changes: 1 addition & 1 deletion sfast/csrc/operators/cudnn/cudnn_convolution.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Tensor cudnn_convolution_bias_tanh(const Tensor &input_t,
IntArrayRef output_padding, int64_t groups);
#endif

void initCUDNNConvolutionBindings(Library &m);
void initCUDNNConvolutionBindings(torch::Library &m);

} // namespace operators
} // namespace sfast
2 changes: 1 addition & 1 deletion sfast/csrc/operators/fused_linear.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Tensor linear_gelu(const Tensor &input, const Tensor &weight,
return linear_activation(input, weight, bias, true);
}

void initFusedLinearBindings(Library &m) {
void initFusedLinearBindings(torch::Library &m) {
m.def("linear_relu",
dispatch(c10::DispatchKey::CompositeExplicitAutograd, linear_relu));
m.def("linear_gelu",
Expand Down
2 changes: 1 addition & 1 deletion sfast/csrc/operators/fused_linear.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Tensor linear_relu(const Tensor &input_t, const Tensor &weight_t,
Tensor linear_gelu(const Tensor &input_t, const Tensor &weight_t,
const c10::optional<Tensor> &bias_t = {});

void initFusedLinearBindings(Library &m);
void initFusedLinearBindings(torch::Library &m);

} // namespace operators
} // namespace sfast

0 comments on commit ccbdeff

Please sign in to comment.