Mentions légales du service

Skip to content
Snippets Groups Projects
Commit a542cdb1 authored by hhakim's avatar hhakim
Browse files

Fix Visual Studio errors in GPU2.

- Ambiguous ctor calls in MatDense and MatSparse.
- Explicit type Transform<FPP,GPU2>::iterator (using typename).
	(c:\gitlab-runner\builds\fzds3qmm\0\faustgrp\faust\src\faust_linear_operator\gpu2\faust_Transform_gpu.h(79): warning C4346: 'iterator': dependent name is not a type [C:\Gitlab-Runner\builds\FzDs3qMm\0\faustgrp\faust\build\faust.vcxproj])
- Adding GPU2 cpp files to source files of pyfaust wrapper (fix to undefined symbols).
parent 393c6ba2
Branches
Tags
No related merge requests found
...@@ -12,7 +12,7 @@ stages: ...@@ -12,7 +12,7 @@ stages:
- test - test
- pkg_rev - pkg_rev
.ctest: ctest:
<<: *ctest_script <<: *ctest_script
variables: {SLOW_TESTS: "OFF", BUILD_MULTITHREAD: "ON"} # the CDashConfScript is able to retrieve OpenMP_gomp_LIBRARY and OpenMP_INC_DIR from environment (it's necessary on macOS, so the runner's env. must be configured) variables: {SLOW_TESTS: "OFF", BUILD_MULTITHREAD: "ON"} # the CDashConfScript is able to retrieve OpenMP_gomp_LIBRARY and OpenMP_INC_DIR from environment (it's necessary on macOS, so the runner's env. must be configured)
except: except:
...@@ -22,7 +22,7 @@ stages: ...@@ -22,7 +22,7 @@ stages:
tags: tags:
- linux - linux
.ctest_python: ctest_python:
<<: *ctest_script <<: *ctest_script
variables: {BUILD_WRAPPER_PYTHON: "ON", SLOW_TESTS: "OFF", DONT_PYPLOT_FAUST_TIME: "ON", NOCPPTESTS: "ON", NOPY2: "ON", BUILD_MULTITHREAD: "ON"} #, GIT_STRATEGY: none} variables: {BUILD_WRAPPER_PYTHON: "ON", SLOW_TESTS: "OFF", DONT_PYPLOT_FAUST_TIME: "ON", NOCPPTESTS: "ON", NOPY2: "ON", BUILD_MULTITHREAD: "ON"} #, GIT_STRATEGY: none}
except: except:
...@@ -33,7 +33,7 @@ stages: ...@@ -33,7 +33,7 @@ stages:
tags: tags:
- linux - linux
.ctest_matlab: ctest_matlab:
<<: *ctest_script <<: *ctest_script
variables: {BUILD_WRAPPER_MATLAB: "ON", SLOW_TESTS: "OFF", NOCPPTESTS: "ON", BUILD_MULTITHREAD: "OFF"} # MT OFF because of macOS complicated way to enable OpenMP (but packages are OMP enabled) variables: {BUILD_WRAPPER_MATLAB: "ON", SLOW_TESTS: "OFF", NOCPPTESTS: "ON", BUILD_MULTITHREAD: "OFF"} # MT OFF because of macOS complicated way to enable OpenMP (but packages are OMP enabled)
except: except:
...@@ -68,7 +68,7 @@ ctest_nightly_macos: ...@@ -68,7 +68,7 @@ ctest_nightly_macos:
tags: tags:
- win10 - win10
.pkg_macos: pkg_macos:
stage: pkg_rev stage: pkg_rev
script: script:
- SHA_START=$(echo $CI_COMMIT_SHA | sed -e 's/^\(.\{8\}\).*/\1/') - SHA_START=$(echo $CI_COMMIT_SHA | sed -e 's/^\(.\{8\}\).*/\1/')
...@@ -144,7 +144,7 @@ pkg_win: ...@@ -144,7 +144,7 @@ pkg_win:
- cmake -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-9.2 -DCMAKE_CUDA_COMPILER=/usr/local/cuda-9.2/bin/nvcc ..; make - cmake -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-9.2 -DCMAKE_CUDA_COMPILER=/usr/local/cuda-9.2/bin/nvcc ..; make
- cd ../.. - cd ../..
.pkg_linux: pkg_linux:
<<: *build_gpu_mod <<: *build_gpu_mod
stage: pkg_rev stage: pkg_rev
variables: {GIT_SUBMODULE_STRATEGY: recursive} # for checking out gpu_mod variables: {GIT_SUBMODULE_STRATEGY: recursive} # for checking out gpu_mod
...@@ -311,13 +311,13 @@ pages: ...@@ -311,13 +311,13 @@ pages:
- schedules - schedules
- tags - tags
.pkg_macos_purepy_rev: pkg_macos_purepy_rev:
extends: .pkg_purepy_rev extends: .pkg_purepy_rev
variables: {MATIO_STATIC_LIB_PATH: "/usr/local/lib/libmatio.a", Z_STATIC_LIB_PATH: "/opt/local/lib/libz.a", HDF5_STATIC_LIB_PATH: "/opt/local/lib/libhdf5.a", EXPERIMENTAL_PKG: "ON", BUILD_MULTITHREAD: "ON", NOPY2: "ON"} variables: {MATIO_STATIC_LIB_PATH: "/usr/local/lib/libmatio.a", Z_STATIC_LIB_PATH: "/opt/local/lib/libz.a", HDF5_STATIC_LIB_PATH: "/opt/local/lib/libhdf5.a", EXPERIMENTAL_PKG: "ON", BUILD_MULTITHREAD: "ON", NOPY2: "ON"}
tags: tags:
- macos - macos
.pkg_linux_purepy_rev: pkg_linux_purepy_rev:
extends: .pkg_purepy_rev extends: .pkg_purepy_rev
variables: {GIT_SUBMODULE_STRATEGY: recursive, MATIO_STATIC_LIB_PATH: "/opt/local/matio-1.5.7/src/.libs/libmatio.a", Z_STATIC_LIB_PATH: "/opt/local/zlib-1.2.11/libz.a", HDF5_STATIC_LIB_PATH: "/opt/local/hdf5-1.8.18/src/.libs/libhdf5.a", BUILD_MULTITHREAD: "ON", NOPY2: "ON", USE_GPU_MOD: "ON", CMAKE_PREFIX_PATH: "../gpu_mod", EXPERIMENTAL_PKG: "ON"} variables: {GIT_SUBMODULE_STRATEGY: recursive, MATIO_STATIC_LIB_PATH: "/opt/local/matio-1.5.7/src/.libs/libmatio.a", Z_STATIC_LIB_PATH: "/opt/local/zlib-1.2.11/libz.a", HDF5_STATIC_LIB_PATH: "/opt/local/hdf5-1.8.18/src/.libs/libhdf5.a", BUILD_MULTITHREAD: "ON", NOPY2: "ON", USE_GPU_MOD: "ON", CMAKE_PREFIX_PATH: "../gpu_mod", EXPERIMENTAL_PKG: "ON"}
tags: tags:
......
...@@ -53,7 +53,9 @@ namespace Faust ...@@ -53,7 +53,9 @@ namespace Faust
{ {
auto dsm_funcs = GPUModHandler::get_singleton()->dsm_funcs(FSFG(0)); auto dsm_funcs = GPUModHandler::get_singleton()->dsm_funcs(FSFG(0));
if(gpu_mat != nullptr) if(gpu_mat != nullptr)
{
dsm_funcs->free(gpu_mat); dsm_funcs->free(gpu_mat);
}
} }
template<> template<>
...@@ -95,7 +97,7 @@ namespace Faust ...@@ -95,7 +97,7 @@ namespace Faust
Faust::Vect<FSFG,Cpu> Faust::MatDense<FSFG,GPU2>::multiply(const Faust::Vect<FSFG, Cpu> &vec) Faust::Vect<FSFG,Cpu> Faust::MatDense<FSFG,GPU2>::multiply(const Faust::Vect<FSFG, Cpu> &vec)
{ {
auto dsm_funcs = GPUModHandler::get_singleton()->dsm_funcs(FSFG(0)); auto dsm_funcs = GPUModHandler::get_singleton()->dsm_funcs(FSFG(0));
MatDense<FSFG, GPU2> gpu_vec(vec.size(), 1, vec.getData()); MatDense<FSFG, GPU2> gpu_vec(vec.size(), 1, vec.getData(), /* no_alloc */ false, /*dev_id=*/-1, /*stream=*/nullptr); // avoiding ambiguity for the ctor overload choice (gcc warning)
Faust::Vect<FSFG, Cpu> out_v(getNbCol()); Faust::Vect<FSFG, Cpu> out_v(getNbCol());
dsm_funcs->mul_gpu_dsm_tocpu_ext(this->gpu_mat, gpu_vec.gpu_mat, out_v.getData(), OP_NOTRANSP, OP_NOTRANSP); dsm_funcs->mul_gpu_dsm_tocpu_ext(this->gpu_mat, gpu_vec.gpu_mat, out_v.getData(), OP_NOTRANSP, OP_NOTRANSP);
return out_v; return out_v;
...@@ -396,7 +398,7 @@ namespace Faust ...@@ -396,7 +398,7 @@ namespace Faust
// other = this * other // other = this * other
auto dsm_funcs = GPUModHandler::get_singleton()->dsm_funcs(FSFG(0)); auto dsm_funcs = GPUModHandler::get_singleton()->dsm_funcs(FSFG(0));
dsm_funcs->mul_gpu_dsm_ext(this->gpu_mat, A.gpu_mat, this->gpu_mat, OP_NOTRANSP, OP_NOTRANSP); dsm_funcs->mul_gpu_dsm_ext(this->gpu_mat, A.gpu_mat, this->gpu_mat, OP_NOTRANSP, OP_NOTRANSP);
Faust::MatDense<FSFG,GPU2> new_this(getNbRow(), A.getNbCol(), nullptr); Faust::MatDense<FSFG,GPU2> new_this(getNbRow(), A.getNbCol(), nullptr, /* no_alloc */ false, /*dev_id=*/-1, /*stream=*/nullptr);
dsm_funcs->mul_gpu_dsm_ext(this->gpu_mat, A.gpu_mat, new_this.gpu_mat, OP_NOTRANSP, OP_NOTRANSP); dsm_funcs->mul_gpu_dsm_ext(this->gpu_mat, A.gpu_mat, new_this.gpu_mat, OP_NOTRANSP, OP_NOTRANSP);
auto tmp = this->gpu_mat; auto tmp = this->gpu_mat;
this->gpu_mat = new_this.gpu_mat; this->gpu_mat = new_this.gpu_mat;
......
...@@ -69,7 +69,7 @@ namespace Faust ...@@ -69,7 +69,7 @@ namespace Faust
} }
template<> template<>
Faust::MatSparse<@FAUST_SCALAR_FOR_GM@,GPU2>::MatSparse() : MatSparse<@FAUST_SCALAR_FOR_GM@,GPU2>(0,0) Faust::MatSparse<@FAUST_SCALAR_FOR_GM@,GPU2>::MatSparse() : MatSparse<@FAUST_SCALAR_FOR_GM@,GPU2>(0,0, /* nnz=*/ 0, /* values=*/ nullptr, /* rowptr=*/nullptr, /*colinds=*/nullptr, /*dev_id=*/-1, /* stream=*/ nullptr, /* nozero=*/false)
{ {
} }
......
...@@ -76,8 +76,8 @@ namespace Faust ...@@ -76,8 +76,8 @@ namespace Faust
const Transform<FPP, GPU2> & container; const Transform<FPP, GPU2> & container;
}; };
Transform<FPP,GPU2>::iterator begin() const; typename Transform<FPP,GPU2>::iterator begin() const;
Transform<FPP,GPU2>::iterator end() const; typename Transform<FPP,GPU2>::iterator end() const;
}; };
} }
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
#define _FSFG_ #define _FSFG_
typedef @FAUST_SCALAR_FOR_GM@ FSFG; typedef @FAUST_SCALAR_FOR_GM@ FSFG;
#endif #endif
//TODO: move to cpp.in
namespace Faust namespace Faust
{ {
......
#ifndef __FAUST_VECT_GPU2__ #ifndef __FAUST_VECT_GPU2__
#define __FAUST_VECT_GPU2__ #define __FAUST_VECT_GPU2__
#define NOMINMAX // avoids VS min/max issue with std::min/max.
#include "faust_MatDense_gpu.h" #include "faust_MatDense_gpu.h"
namespace Faust namespace Faust
......
...@@ -15,6 +15,9 @@ if(${USE_MATIO_STATIC_LIBS}) ...@@ -15,6 +15,9 @@ if(${USE_MATIO_STATIC_LIBS})
else() # WIN32 # intended for Visual Studio! else() # WIN32 # intended for Visual Studio!
# compile the pyx and all faust .cpp needed (instead to link to faust.lib) # compile the pyx and all faust .cpp needed (instead to link to faust.lib)
set(PY_EXT_SOURCES "${PY_EXT_SOURCES}+glob('${FAUST_LINEAR_OPERATOR_CPU_SRC_DIR}/*.cpp')+glob('${FAUST_SRC_LINEAR_OPERATOR_DIR}/*.cpp')+glob('${FAUST_ALGORITHM_CONSTRAINT_SRC_DIR}/*.cpp')+glob('${FAUST_ALGORITHM_FACTORIZATION_SRC_DIR}/*.cpp')+glob('${FAUST_UTILS_SRC_DIR}/*.cpp')") set(PY_EXT_SOURCES "${PY_EXT_SOURCES}+glob('${FAUST_LINEAR_OPERATOR_CPU_SRC_DIR}/*.cpp')+glob('${FAUST_SRC_LINEAR_OPERATOR_DIR}/*.cpp')+glob('${FAUST_ALGORITHM_CONSTRAINT_SRC_DIR}/*.cpp')+glob('${FAUST_ALGORITHM_FACTORIZATION_SRC_DIR}/*.cpp')+glob('${FAUST_UTILS_SRC_DIR}/*.cpp')")
if(USE_GPU_MOD)
set(PY_EXT_SOURCES "${PY_EXT_SOURCES}+glob('${FAUST_SRC_LINEAR_OPERATOR_GPU2_DIR}/*.cpp')")
endif()
# extract the name (without .lib suffix) and the path of each libs: # extract the name (without .lib suffix) and the path of each libs:
# 1/ matio # 1/ matio
get_filename_component(MATIO_LIB_DIR ${MATIO_STATIC_LIB_PATH} DIRECTORY) get_filename_component(MATIO_LIB_DIR ${MATIO_STATIC_LIB_PATH} DIRECTORY)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment