OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TestTorchTableFunctions.h
Go to the documentation of this file.
1 /*
2  * Copyright 2023 HEAVY.AI, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #pragma once
18 
20 
21 #ifndef __CUDACC__
22 
23 // clang-format off
24 /*
25  UDTF: tf_test_runtime_torch(TableFunctionManager, Column<int64_t>) -> Column<int64_t>
26  UDTF: tf_test_runtime_torch_template__template(TableFunctionManager, Column<T>) -> Column<T>, T=[int64_t, double]
27  UDTF: tf_test_torch_regression(TableFunctionManager, ColumnList<double> features,
28  int32_t batch_size | default=32,
29  bool use_gpu | default=true, bool save_model | default=true,
30  TextEncodingNone model_filename | default="test.pt" | require = "!save_model || model_filename.size() != 0") -> Column<double> output
31  UDTF: tf_test_torch_generate_random_column(TableFunctionManager, int32_t num_elements) -> Column<double> output
32  UDTF: tf_test_torch_load_model(TableFunctionManager, TextEncodingNone model_filename) -> Column<bool>
33 */
34 
35 // clang-format on
36 
39  Column<int64_t>& input,
40  Column<int64_t>& output);
41 
42 template <typename T>
43 TEMPLATE_NOINLINE int32_t
45  const Column<T>& input,
46  Column<T>& output);
47 
48 EXTENSION_NOINLINE int32_t
50  const ColumnList<double>& features,
51  int32_t batch_size,
52  bool use_gpu,
53  bool save_model,
54  const TextEncodingNone& model_filename,
55  Column<double>& output);
56 
58  int32_t num_elements,
59  Column<double>& output);
60 
61 EXTENSION_NOINLINE int32_t
63  const TextEncodingNone& model_filename,
64  Column<bool>& output);
65 
66 #endif // __CUDACC__
#define EXTENSION_NOINLINE
Definition: heavydbTypes.h:58
EXTENSION_NOINLINE int32_t tf_test_torch_load_model(TableFunctionManager &mgr, const TextEncodingNone &model_filename, Column< bool > &output)
TEMPLATE_NOINLINE int32_t tf_test_runtime_torch_template__template(TableFunctionManager &mgr, const Column< T > &input, Column< T > &output)
EXTENSION_NOINLINE int32_t tf_test_torch_regression(TableFunctionManager &mgr, const ColumnList< double > &features, int32_t batch_size, bool use_gpu, bool save_model, const TextEncodingNone &model_filename, Column< double > &output)
EXTENSION_NOINLINE int32_t tf_test_torch_generate_random_column(TableFunctionManager &mgr, int32_t num_elements, Column< double > &output)
EXTENSION_NOINLINE int32_t tf_test_runtime_torch(TableFunctionManager &mgr, Column< int64_t > &input, Column< int64_t > &output)
#define TEMPLATE_NOINLINE
Definition: heavydbTypes.h:60