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:
- test
- pkg_rev
.ctest:
ctest:
<<: *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)
except:
......@@ -22,7 +22,7 @@ stages:
tags:
- linux
.ctest_python:
ctest_python:
<<: *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}
except:
......@@ -33,7 +33,7 @@ stages:
tags:
- linux
.ctest_matlab:
ctest_matlab:
<<: *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)
except:
......@@ -68,7 +68,7 @@ ctest_nightly_macos:
tags:
- win10
.pkg_macos:
pkg_macos:
stage: pkg_rev
script:
- SHA_START=$(echo $CI_COMMIT_SHA | sed -e 's/^\(.\{8\}\).*/\1/')
......@@ -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
- cd ../..
.pkg_linux:
pkg_linux:
<<: *build_gpu_mod
stage: pkg_rev
variables: {GIT_SUBMODULE_STRATEGY: recursive} # for checking out gpu_mod
......@@ -311,13 +311,13 @@ pages:
- schedules
- tags
.pkg_macos_purepy_rev:
pkg_macos_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"}
tags:
- macos
.pkg_linux_purepy_rev:
pkg_linux_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"}
tags:
......
......@@ -53,7 +53,9 @@ namespace Faust
{
auto dsm_funcs = GPUModHandler::get_singleton()->dsm_funcs(FSFG(0));
if(gpu_mat != nullptr)
{
dsm_funcs->free(gpu_mat);
}
}
template<>
......@@ -95,7 +97,7 @@ namespace Faust
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));
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());
dsm_funcs->mul_gpu_dsm_tocpu_ext(this->gpu_mat, gpu_vec.gpu_mat, out_v.getData(), OP_NOTRANSP, OP_NOTRANSP);
return out_v;
......@@ -396,7 +398,7 @@ namespace Faust
// other = this * other
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);
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);
auto tmp = this->gpu_mat;
this->gpu_mat = new_this.gpu_mat;
......
......@@ -69,7 +69,7 @@ namespace Faust
}
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
const Transform<FPP, GPU2> & container;
};
Transform<FPP,GPU2>::iterator begin() const;
Transform<FPP,GPU2>::iterator end() const;
typename Transform<FPP,GPU2>::iterator begin() const;
typename Transform<FPP,GPU2>::iterator end() const;
};
}
......
......@@ -3,7 +3,6 @@
#define _FSFG_
typedef @FAUST_SCALAR_FOR_GM@ FSFG;
#endif
//TODO: move to cpp.in
namespace Faust
{
......
#ifndef __FAUST_VECT_GPU2__
#define __FAUST_VECT_GPU2__
#define NOMINMAX // avoids VS min/max issue with std::min/max.
#include "faust_MatDense_gpu.h"
namespace Faust
......
......@@ -15,6 +15,9 @@ if(${USE_MATIO_STATIC_LIBS})
else() # WIN32 # intended for Visual Studio!
# 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')")
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:
# 1/ matio
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