mirror of
https://github.com/marian-nmt/marian.git
synced 2024-09-11 06:15:56 +03:00
Merged PR 13039: FAISS builds with Windows
FAISS builds with Windows
This commit is contained in:
parent
5a439245b1
commit
f9029638ff
@ -1,12 +1,19 @@
|
||||
import onnxruntime as ort
|
||||
import numpy as np
|
||||
import onnx
|
||||
import os, sys, time
|
||||
|
||||
os.environ['OMP_NUM_THREADS'] = '1'
|
||||
sess_options = ort.SessionOptions()
|
||||
sess_options.intra_op_num_threads = 1
|
||||
sess_options.execution_mode = ort.ExecutionMode.ORT_SEQUENTIAL
|
||||
sess_options.graph_optimization_level = ort.GraphOptimizationLevel.ORT_ENABLE_ALL
|
||||
|
||||
def get_function(path, output_vars):
|
||||
print("Reading ONNX function from", path)
|
||||
#model = onnx.load(path)
|
||||
#print(model)
|
||||
ort_sess = ort.InferenceSession(path)
|
||||
ort_sess = ort.InferenceSession(path, sess_options)
|
||||
output_defs = ort_sess.get_outputs()
|
||||
for input in ort_sess.get_inputs():
|
||||
print(" input: ", input.name, input.shape, input.type)
|
||||
@ -61,10 +68,12 @@ def greedy_decode(data_0):
|
||||
Y.append(np.argmax(logp[0][0]))
|
||||
return Y
|
||||
|
||||
with open("C:/work/marian-dev/local/model/predictions.out-onnx-debug-sin-3.tok", 'wt', encoding='utf-8') as out_f:
|
||||
for line in open("C:/work/marian-dev/local/model/predictions.in.tok", encoding='utf-8').readlines():
|
||||
start_time = time.time()
|
||||
with open("C:/work/marian-dev/local/model/predictions.out-onnx-debug-sin-3-first100.tok", 'wt', encoding='utf-8') as out_f:
|
||||
for line in open("C:/work/marian-dev/local/model/predictions.in-first100.tok", encoding='utf-8').readlines():
|
||||
data = [word2id.get(w, unk_id) for w in (line.rstrip() + " </s>").split(' ') if w]
|
||||
Y = greedy_decode(data)
|
||||
print("input: ", ' '.join(id2word[x] for x in data))
|
||||
print("output:", ' '.join(id2word[y] for y in Y))
|
||||
print(' '.join(id2word[y] for y in Y[:-1]), file=out_f, flush=True) # strip </s> for output to file
|
||||
print("--- %s seconds ---" % (time.time() - start_time))
|
||||
|
2
src/3rd_party/faiss/Index.h
vendored
2
src/3rd_party/faiss/Index.h
vendored
@ -67,7 +67,7 @@ struct Index {
|
||||
float metric_arg; ///< argument of the metric type
|
||||
|
||||
explicit Index (idx_t d = 0, MetricType metric = METRIC_L2):
|
||||
d(d),
|
||||
d((int)d),
|
||||
ntotal(0),
|
||||
verbose(false),
|
||||
is_trained(true),
|
||||
|
9
src/3rd_party/faiss/VectorTransform.cpp
vendored
9
src/3rd_party/faiss/VectorTransform.cpp
vendored
@ -132,12 +132,17 @@ const float *fvecs_maybe_subsample(
|
||||
return x_subset;
|
||||
}
|
||||
|
||||
#ifdef __SSE__
|
||||
#if 1 // def __SSE__
|
||||
// reads 0 <= d < 4 floats as __m128
|
||||
static inline __m128 masked_read(int d, const float *x)
|
||||
{
|
||||
assert(0 <= d && d < 4);
|
||||
__attribute__((__aligned__(16))) float buf[4] = { 0, 0, 0, 0 };
|
||||
#ifdef _MSC_VER
|
||||
__declspec(align(16))
|
||||
#else
|
||||
__attribute__((__aligned__(16)))
|
||||
#endif
|
||||
float buf[4] = { 0, 0, 0, 0 };
|
||||
switch (d) {
|
||||
case 3:
|
||||
buf[2] = x[2];
|
||||
|
3
src/3rd_party/faiss/utils/hamming-inl.h
vendored
3
src/3rd_party/faiss/utils/hamming-inl.h
vendored
@ -10,6 +10,9 @@
|
||||
namespace faiss {
|
||||
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define bzero(p,n) (memset((p),0,(n)))
|
||||
#endif
|
||||
inline BitstringWriter::BitstringWriter(uint8_t *code, int code_size):
|
||||
code (code), code_size (code_size), i(0)
|
||||
{
|
||||
|
6
src/3rd_party/faiss/utils/hamming.h
vendored
6
src/3rd_party/faiss/utils/hamming.h
vendored
@ -29,6 +29,10 @@
|
||||
|
||||
#include <faiss/utils/Heap.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <intrin.h> // needed for some intrinsics in <memory>
|
||||
#define __builtin_popcountl __popcnt64
|
||||
#endif
|
||||
|
||||
/* The Hamming distance type */
|
||||
typedef int32_t hamdis_t;
|
||||
@ -111,7 +115,7 @@ struct BitstringReader {
|
||||
|
||||
extern size_t hamming_batch_size;
|
||||
|
||||
inline int popcount64(uint64_t x) {
|
||||
static inline int popcount64(uint64_t x) {
|
||||
return __builtin_popcountl(x);
|
||||
}
|
||||
|
||||
|
@ -264,7 +264,7 @@ Ptr<NodeInitializer> randomRotation(size_t seed) {
|
||||
int rows = t->shape()[-2];
|
||||
int cols = t->shape()[-1];
|
||||
faiss::RandomRotationMatrix rrot(cols, rows); // transposed in faiss
|
||||
rrot.init(seed);
|
||||
rrot.init((int)seed);
|
||||
t->set(rrot.A);
|
||||
};
|
||||
return fromLambda(rot, Type::float32);
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include <memory>
|
||||
|
||||
namespace faiss {
|
||||
class IndexLSH;
|
||||
struct IndexLSH;
|
||||
}
|
||||
|
||||
namespace marian {
|
||||
|
@ -97,9 +97,9 @@ public:
|
||||
}
|
||||
auto frequencies = graph_->constant({ dimEmb }, inits::fromVector(sinusoidalEmbeddingsFreq_));
|
||||
auto cosOffsets = graph_->constant({ dimEmb }, inits::fromVector(sinusoidalEmbeddingsOffs_));
|
||||
auto positionRange = graph_->constant({ dimWords, 1, 1 }, inits::range((float)start, (float)start + (float)dimWords));
|
||||
positionRange->set_name("data_" + std::to_string(batchIndex_) + "_posrange");
|
||||
auto signal = sin(positionRange * frequencies + cosOffsets);
|
||||
auto positionRange = graph_->constant({ dimWords, 1, 1 }, inits::range((float)start, (float)start + (float)dimWords));
|
||||
positionRange->set_name("data_" + std::to_string(batchIndex_) + "_posrange");
|
||||
auto signal = sin(positionRange * frequencies + cosOffsets);
|
||||
|
||||
embeddings = embeddings + signal;
|
||||
}
|
||||
@ -615,7 +615,7 @@ private:
|
||||
"prefix", prefix_ + "_ff_logit_out",
|
||||
"dim", dimTrgVoc,
|
||||
"vocab", opt<std::vector<std::string>>("vocabs")[batchIndex_], // for factored outputs
|
||||
"output-approx-knn", opt<std::vector<int>>("output-approx-knn"),
|
||||
"output-approx-knn", opt<std::vector<int>>("output-approx-knn", {}),
|
||||
"lemma-dim-emb", opt<int>("lemma-dim-emb", 0)); // for factored outputs
|
||||
|
||||
if(opt<bool>("tied-embeddings") || opt<bool>("tied-embeddings-all"))
|
||||
@ -637,7 +637,7 @@ public:
|
||||
int dim = opt<int>("dim-emb");
|
||||
|
||||
auto start = graph->constant({1, 1, dimBatch, dim}, inits::zeros());
|
||||
start->set_name("decoder_start_state_" + std::to_string(batchIndex_));
|
||||
start->set_name("decoder_start_state_" + std::to_string(batchIndex_));
|
||||
rnn::States startStates(opt<size_t>("dec-depth"), {start, start});
|
||||
|
||||
// don't use TransformerState for RNN layers
|
||||
|
@ -141,6 +141,48 @@
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\src\3rd_party\ExceptionWithCallStack.cpp" />
|
||||
<ClCompile Include="..\src\3rd_party\faiss\Index.cpp">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">USE_ONNX=1;USE_MKL;ASMJIT_EXPORTS;BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE; FBGEMM_EXPORTS; USE_FBGEMM=1; USE_SSE2=1; CUDA_FOUND=1; MKL_FOUND=1; MPI_FOUND=1; BLAS_FOUND=1; MKL_ILP64; WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">USE_ONNX=1;USE_MKL;ASMJIT_EXPORTS;BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE; FBGEMM_EXPORTS; USE_FBGEMM=1; USE_SSE2=1; CUDA_FOUND=1; MKL_FOUND=1; MPI_FOUND=1; BLAS_FOUND=1; MKL_ILP64; WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\3rd_party\faiss\IndexLSH.cpp">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">USE_ONNX=1;USE_MKL;ASMJIT_EXPORTS;BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE; FBGEMM_EXPORTS; USE_FBGEMM=1; USE_SSE2=1; CUDA_FOUND=1; MKL_FOUND=1; MPI_FOUND=1; BLAS_FOUND=1; MKL_ILP64; WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">USE_ONNX=1;USE_MKL;ASMJIT_EXPORTS;BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE; FBGEMM_EXPORTS; USE_FBGEMM=1; USE_SSE2=1; CUDA_FOUND=1; MKL_FOUND=1; MPI_FOUND=1; BLAS_FOUND=1; MKL_ILP64; WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\3rd_party\faiss\utils\hamming.cpp">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">USE_ONNX=1;USE_MKL;ASMJIT_EXPORTS;BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE; FBGEMM_EXPORTS; USE_FBGEMM=1; USE_SSE2=1; CUDA_FOUND=1; MKL_FOUND=1; MPI_FOUND=1; BLAS_FOUND=1; MKL_ILP64; WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">USE_ONNX=1;USE_MKL;ASMJIT_EXPORTS;BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE; FBGEMM_EXPORTS; USE_FBGEMM=1; USE_SSE2=1; CUDA_FOUND=1; MKL_FOUND=1; MPI_FOUND=1; BLAS_FOUND=1; MKL_ILP64; WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\3rd_party\faiss\utils\Heap.cpp">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">USE_ONNX=1;USE_MKL;ASMJIT_EXPORTS;BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE; FBGEMM_EXPORTS; USE_FBGEMM=1; USE_SSE2=1; CUDA_FOUND=1; MKL_FOUND=1; MPI_FOUND=1; BLAS_FOUND=1; MKL_ILP64; WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">USE_ONNX=1;USE_MKL;ASMJIT_EXPORTS;BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE; FBGEMM_EXPORTS; USE_FBGEMM=1; USE_SSE2=1; CUDA_FOUND=1; MKL_FOUND=1; MPI_FOUND=1; BLAS_FOUND=1; MKL_ILP64; WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\3rd_party\faiss\utils\misc.cpp">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">USE_ONNX=1;USE_MKL;ASMJIT_EXPORTS;BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE; FBGEMM_EXPORTS; USE_FBGEMM=1; USE_SSE2=1; CUDA_FOUND=1; MKL_FOUND=1; MPI_FOUND=1; BLAS_FOUND=1; MKL_ILP64; WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">USE_ONNX=1;USE_MKL;ASMJIT_EXPORTS;BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE; FBGEMM_EXPORTS; USE_FBGEMM=1; USE_SSE2=1; CUDA_FOUND=1; MKL_FOUND=1; MPI_FOUND=1; BLAS_FOUND=1; MKL_ILP64; WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\3rd_party\faiss\utils\random.cpp">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">USE_ONNX=1;USE_MKL;ASMJIT_EXPORTS;BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE; FBGEMM_EXPORTS; USE_FBGEMM=1; USE_SSE2=1; CUDA_FOUND=1; MKL_FOUND=1; MPI_FOUND=1; BLAS_FOUND=1; MKL_ILP64; WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">USE_ONNX=1;USE_MKL;ASMJIT_EXPORTS;BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE; FBGEMM_EXPORTS; USE_FBGEMM=1; USE_SSE2=1; CUDA_FOUND=1; MKL_FOUND=1; MPI_FOUND=1; BLAS_FOUND=1; MKL_ILP64; WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\3rd_party\faiss\VectorTransform.cpp">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">TurnOffAllWarnings</WarningLevel>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">USE_ONNX=1;USE_MKL;ASMJIT_EXPORTS;BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE; FBGEMM_EXPORTS; USE_FBGEMM=1; USE_SSE2=1; CUDA_FOUND=1; MKL_FOUND=1; MPI_FOUND=1; BLAS_FOUND=1; MKL_ILP64; WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">USE_ONNX=1;USE_MKL;ASMJIT_EXPORTS;BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE; FBGEMM_EXPORTS; USE_FBGEMM=1; USE_SSE2=1; CUDA_FOUND=1; MKL_FOUND=1; MPI_FOUND=1; BLAS_FOUND=1; MKL_ILP64; WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\3rd_party\fbgemm\bench\BenchUtils.cc">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
@ -1020,6 +1062,14 @@
|
||||
<ClInclude Include="..\src\3rd_party\any_type.h" />
|
||||
<ClInclude Include="..\src\3rd_party\avx_mathfun.h" />
|
||||
<ClInclude Include="..\src\3rd_party\ExceptionWithCallStack.h" />
|
||||
<ClInclude Include="..\src\3rd_party\faiss\Index.h" />
|
||||
<ClInclude Include="..\src\3rd_party\faiss\IndexLSH.h" />
|
||||
<ClInclude Include="..\src\3rd_party\faiss\utils\hamming-inl.h" />
|
||||
<ClInclude Include="..\src\3rd_party\faiss\utils\hamming.h" />
|
||||
<ClInclude Include="..\src\3rd_party\faiss\utils\Heap.h" />
|
||||
<ClInclude Include="..\src\3rd_party\faiss\utils\misc.h" />
|
||||
<ClInclude Include="..\src\3rd_party\faiss\utils\random.h" />
|
||||
<ClInclude Include="..\src\3rd_party\faiss\VectorTransform.h" />
|
||||
<ClInclude Include="..\src\3rd_party\fbgemm\bench\AlignedVec.h" />
|
||||
<ClInclude Include="..\src\3rd_party\fbgemm\bench\BenchUtils.h" />
|
||||
<ClInclude Include="..\src\3rd_party\fbgemm\include\fbgemm\ConvUtils.h" />
|
||||
@ -1392,6 +1442,7 @@
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\layers\generic.cpp" />
|
||||
<ClCompile Include="..\src\layers\loss.cpp" />
|
||||
<ClCompile Include="..\src\layers\lsh.cpp" />
|
||||
<ClCompile Include="..\src\layers\weight.cpp" />
|
||||
<ClCompile Include="..\src\microsoft\quicksand.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
|
||||
@ -1426,31 +1477,19 @@
|
||||
<ClCompile Include="..\src\tensors\cpu\topk.cpp" />
|
||||
<ClCompile Include="..\src\tensors\rand.cpp" />
|
||||
<ClCompile Include="..\src\tensors\tensor.cpp" />
|
||||
<ClCompile Include="..\src\tests\attention_tests.cpp">
|
||||
<ClCompile Include="..\src\tests\cli.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\tests\cli_test.cpp">
|
||||
<ClCompile Include="..\src\tests\dropout.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\tests\dropout_test.cpp">
|
||||
<ClCompile Include="..\src\tests\logger.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\tests\graph_tests.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\tests\logger_test.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\tests\operator_tests.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\tests\pooling_test.cpp">
|
||||
<ClCompile Include="..\src\tests\pooling.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
@ -1458,15 +1497,35 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\tests\rnn_tests.cpp">
|
||||
<ClCompile Include="..\src\tests\sqlite.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\tests\run_tests.cpp">
|
||||
<ClCompile Include="..\src\tests\units\attention_tests.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\tests\sqlite_test.cpp">
|
||||
<ClCompile Include="..\src\tests\units\fastopt_tests.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\tests\units\graph_tests.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\tests\units\operator_tests.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\tests\units\rnn_tests.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\tests\units\run_tests.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\tests\units\utils_tests.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
@ -1511,6 +1570,7 @@
|
||||
<ClCompile Include="..\src\3rd_party\yaml-cpp\tag.cpp" />
|
||||
<ClCompile Include="..\src\3rd_party\yaml-cpp\contrib\graphbuilder.cpp" />
|
||||
<ClCompile Include="..\src\3rd_party\yaml-cpp\contrib\graphbuilderadapter.cpp" />
|
||||
<ClInclude Include="..\src\layers\lsh.h" />
|
||||
<ClInclude Include="..\src\onnx\expression_graph_onnx_exporter.h" />
|
||||
<ClInclude Include="resource.h" />
|
||||
</ItemGroup>
|
||||
@ -1801,6 +1861,8 @@
|
||||
<ClInclude Include="..\src\training\communicator_nccl.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\src\3rd_party\faiss\LICENSE" />
|
||||
<None Include="..\src\3rd_party\faiss\README" />
|
||||
<None Include="..\src\3rd_party\half_float\Readme.md" />
|
||||
<None Include="..\src\3rd_party\half_float\umHalf.inl" />
|
||||
<None Include="..\src\3rd_party\nccl\src\bootstrap.cu">
|
||||
@ -1933,6 +1995,10 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
|
||||
</CudaCompile>
|
||||
<CudaCompile Include="..\src\tensors\gpu\topk.cu" />
|
||||
<CudaCompile Include="..\src\tests\tensor.cu">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</CudaCompile>
|
||||
<CudaCompile Include="..\src\translator\helpers.cu" />
|
||||
<CudaCompile Include="..\src\translator\nth_element.cu" />
|
||||
</ItemGroup>
|
||||
@ -1964,6 +2030,7 @@
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="..\src\3rd_party\faiss\CMakeLists.txt" />
|
||||
<Text Include="..\src\3rd_party\pathie-cpp\CMakeLists.txt" />
|
||||
<Text Include="..\src\3rd_party\sentencepiece\src\CMakeLists.txt">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
@ -1971,9 +2038,7 @@
|
||||
</Text>
|
||||
<Text Include="..\src\examples\CMakeLists.txt" />
|
||||
<Text Include="..\src\tests\CMakeLists.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Marian.rc" />
|
||||
<Text Include="..\src\tests\units\CMakeLists.txt" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
|
@ -436,39 +436,6 @@
|
||||
<ClCompile Include="..\src\3rd_party\pathie-cpp\src\temp.cpp">
|
||||
<Filter>3rd_party\pathie-cpp\src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\tests\attention_tests.cpp">
|
||||
<Filter>tests</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\tests\cli_test.cpp">
|
||||
<Filter>tests</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\tests\dropout_test.cpp">
|
||||
<Filter>tests</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\tests\graph_tests.cpp">
|
||||
<Filter>tests</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\tests\logger_test.cpp">
|
||||
<Filter>tests</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\tests\operator_tests.cpp">
|
||||
<Filter>tests</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\tests\pooling_test.cpp">
|
||||
<Filter>tests</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\tests\prod.cpp">
|
||||
<Filter>tests</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\tests\rnn_tests.cpp">
|
||||
<Filter>tests</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\tests\run_tests.cpp">
|
||||
<Filter>tests</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\tests\sqlite_test.cpp">
|
||||
<Filter>tests</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\examples\mnist\mnist_ffnn.cpp">
|
||||
<Filter>examples\mnist</Filter>
|
||||
</ClCompile>
|
||||
@ -901,6 +868,69 @@
|
||||
<ClCompile Include="..\src\onnx\expression_graph_onnx_serialization.cpp">
|
||||
<Filter>onnx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\tests\cli.cpp">
|
||||
<Filter>tests</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\tests\dropout.cpp">
|
||||
<Filter>tests</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\tests\logger.cpp">
|
||||
<Filter>tests</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\tests\pooling.cpp">
|
||||
<Filter>tests</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\tests\prod.cpp">
|
||||
<Filter>tests</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\tests\sqlite.cpp">
|
||||
<Filter>tests</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\tests\units\attention_tests.cpp">
|
||||
<Filter>tests\units</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\tests\units\fastopt_tests.cpp">
|
||||
<Filter>tests\units</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\tests\units\graph_tests.cpp">
|
||||
<Filter>tests\units</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\tests\units\operator_tests.cpp">
|
||||
<Filter>tests\units</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\tests\units\rnn_tests.cpp">
|
||||
<Filter>tests\units</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\tests\units\run_tests.cpp">
|
||||
<Filter>tests\units</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\tests\units\utils_tests.cpp">
|
||||
<Filter>tests\units</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\3rd_party\faiss\Index.cpp">
|
||||
<Filter>3rd_party\faiss</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\3rd_party\faiss\IndexLSH.cpp">
|
||||
<Filter>3rd_party\faiss</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\3rd_party\faiss\VectorTransform.cpp">
|
||||
<Filter>3rd_party\faiss</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\3rd_party\faiss\utils\hamming.cpp">
|
||||
<Filter>3rd_party\faiss\utils</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\3rd_party\faiss\utils\Heap.cpp">
|
||||
<Filter>3rd_party\faiss\utils</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\3rd_party\faiss\utils\misc.cpp">
|
||||
<Filter>3rd_party\faiss\utils</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\3rd_party\faiss\utils\random.cpp">
|
||||
<Filter>3rd_party\faiss\utils</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\layers\lsh.cpp">
|
||||
<Filter>layers</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\src\marian.h" />
|
||||
@ -2291,6 +2321,33 @@
|
||||
<ClInclude Include="..\src\onnx\expression_graph_onnx_exporter.h">
|
||||
<Filter>onnx</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\3rd_party\faiss\Index.h">
|
||||
<Filter>3rd_party\faiss</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\3rd_party\faiss\IndexLSH.h">
|
||||
<Filter>3rd_party\faiss</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\3rd_party\faiss\VectorTransform.h">
|
||||
<Filter>3rd_party\faiss</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\3rd_party\faiss\utils\hamming.h">
|
||||
<Filter>3rd_party\faiss\utils</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\3rd_party\faiss\utils\hamming-inl.h">
|
||||
<Filter>3rd_party\faiss\utils</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\3rd_party\faiss\utils\Heap.h">
|
||||
<Filter>3rd_party\faiss\utils</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\3rd_party\faiss\utils\misc.h">
|
||||
<Filter>3rd_party\faiss\utils</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\3rd_party\faiss\utils\random.h">
|
||||
<Filter>3rd_party\faiss\utils</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\layers\lsh.h">
|
||||
<Filter>layers</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="3rd_party">
|
||||
@ -2548,6 +2605,15 @@
|
||||
<Filter Include="onnx">
|
||||
<UniqueIdentifier>{f3849101-b84e-48c1-af5d-27c79ce89e70}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="tests\units">
|
||||
<UniqueIdentifier>{d145421b-1723-47f1-858d-2e49adb24b03}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="3rd_party\faiss">
|
||||
<UniqueIdentifier>{e479c8b0-9309-4df4-a28c-9af145c69b51}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="3rd_party\faiss\utils">
|
||||
<UniqueIdentifier>{b100324b-a506-45fa-948e-40be75b239fc}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\src\3rd_party\nccl\src\bootstrap.cu">
|
||||
@ -2682,6 +2748,12 @@
|
||||
<None Include="..\src\3rd_party\onnx\protobuf\onnx-ml.proto">
|
||||
<Filter>3rd_party\onnx\protobuf</Filter>
|
||||
</None>
|
||||
<None Include="..\src\3rd_party\faiss\LICENSE">
|
||||
<Filter>3rd_party\faiss</Filter>
|
||||
</None>
|
||||
<None Include="..\src\3rd_party\faiss\README">
|
||||
<Filter>3rd_party\faiss</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="..\src\3rd_party\sentencepiece\src\CMakeLists.txt">
|
||||
@ -2696,6 +2768,12 @@
|
||||
<Text Include="..\src\examples\CMakeLists.txt">
|
||||
<Filter>examples</Filter>
|
||||
</Text>
|
||||
<Text Include="..\src\tests\units\CMakeLists.txt">
|
||||
<Filter>tests\units</Filter>
|
||||
</Text>
|
||||
<Text Include="..\src\3rd_party\faiss\CMakeLists.txt">
|
||||
<Filter>3rd_party\faiss</Filter>
|
||||
</Text>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CudaCompile Include="..\src\tensors\gpu\add.cu">
|
||||
@ -2731,8 +2809,8 @@
|
||||
<CudaCompile Include="..\src\tensors\gpu\topk.cu">
|
||||
<Filter>tensors\gpu</Filter>
|
||||
</CudaCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Marian.rc" />
|
||||
<CudaCompile Include="..\src\tests\tensor.cu">
|
||||
<Filter>tests</Filter>
|
||||
</CudaCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
Loading…
Reference in New Issue
Block a user