-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature python interface #53
Changes from 8 commits
f6f428b
da73037
e75ef16
3004424
5496c41
7906cd9
062a9a6
3e7f8a1
057b8fe
4993f4e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -6,6 +6,7 @@ | |||||||||||||||||
#include <iostream> | ||||||||||||||||||
#include <map> | ||||||||||||||||||
#include <nuTens/instrumentation.hpp> | ||||||||||||||||||
#include <nuTens/logging.hpp> | ||||||||||||||||||
#include <nuTens/tensors/dtypes.hpp> | ||||||||||||||||||
#include <variant> | ||||||||||||||||||
#include <vector> | ||||||||||||||||||
|
@@ -42,14 +43,19 @@ | |||||||||||||||||
*/ | ||||||||||||||||||
|
||||||||||||||||||
public: | ||||||||||||||||||
/// Holds the possible "index" types, this allows us to pass integers OR strings as index values which allows us to | ||||||||||||||||||
/// do some basic slicing of tensors similar to python | ||||||||||||||||||
using indexType = std::variant<int, std::string>; | ||||||||||||||||||
|
||||||||||||||||||
/// Container that holds all allowed types that can be returned by a tensor | ||||||||||||||||||
using variantType = std::variant<int, float, double, std::complex<float>, std::complex<double>>; | ||||||||||||||||||
|
||||||||||||||||||
/// @name Constructors | ||||||||||||||||||
/// Use these methods to construct tensors | ||||||||||||||||||
/// @{ | ||||||||||||||||||
|
||||||||||||||||||
/// @brief Default constructor with no initialisation | ||||||||||||||||||
Tensor(){}; | ||||||||||||||||||
Check warning on line 58 in nuTens/tensors/tensor.hpp GitHub Actions / cpp-linternuTens/tensors/tensor.hpp:58:5 [cppcoreguidelines-pro-type-member-init]
|
||||||||||||||||||
|
||||||||||||||||||
/// @brief Construct a 1-d array with specified values | ||||||||||||||||||
/// @arg values The values to include in the tensor | ||||||||||||||||||
|
@@ -233,13 +239,37 @@ | |||||||||||||||||
/// @brief Get elementwise phases of a complex tensor | ||||||||||||||||||
[[nodiscard]] Tensor angle() const; | ||||||||||||||||||
|
||||||||||||||||||
/// @brief Get the result of summing this tensor over some dimension | ||||||||||||||||||
/// @brief Get the cumulative sum over some dimension | ||||||||||||||||||
/// @param dim The dimension to sum over | ||||||||||||||||||
[[nodiscard]] Tensor cumsum(int dim) const; | ||||||||||||||||||
|
||||||||||||||||||
/// @brief Get the result of summing this tensor over all dimensions | ||||||||||||||||||
[[nodiscard]] Tensor sum() const; | ||||||||||||||||||
|
||||||||||||||||||
/// @brief Get the result of summing this tensor over all dimensions | ||||||||||||||||||
/// @param dims The dimensions to sum over | ||||||||||||||||||
[[nodiscard]] Tensor sum(const std::vector<long int> &dims) const; | ||||||||||||||||||
|
||||||||||||||||||
/// @brief Get the cumulative sum over some dimension | ||||||||||||||||||
/// @param dim The dimension to sum over | ||||||||||||||||||
static inline Tensor cumsum(const Tensor &t, int dim) | ||||||||||||||||||
{ | ||||||||||||||||||
return t.cumsum(dim); | ||||||||||||||||||
} | ||||||||||||||||||
|
||||||||||||||||||
/// @brief Get the result of summing this tensor over all dimensions | ||||||||||||||||||
static inline Tensor sum(const Tensor &t) | ||||||||||||||||||
{ | ||||||||||||||||||
return t.sum(); | ||||||||||||||||||
} | ||||||||||||||||||
|
||||||||||||||||||
/// @brief Get the result of summing this tensor over all dimensions | ||||||||||||||||||
/// @param dims The dimensions to sum over | ||||||||||||||||||
static inline Tensor sum(const Tensor &t, const std::vector<long int> &dims) | ||||||||||||||||||
{ | ||||||||||||||||||
return t.sum(dims); | ||||||||||||||||||
} | ||||||||||||||||||
|
||||||||||||||||||
/// @name Gradients | ||||||||||||||||||
/// @{ | ||||||||||||||||||
|
||||||||||||||||||
|
@@ -280,18 +310,24 @@ | |||||||||||||||||
/// @arg indices The indices of the value to set | ||||||||||||||||||
/// @arg value The value to set it to | ||||||||||||||||||
void setValue(const Tensor &indices, const Tensor &value); | ||||||||||||||||||
void setValue(const std::vector<std::variant<int, std::string>> &indices, const Tensor &value); | ||||||||||||||||||
void setValue(const std::vector<indexType> &indices, const Tensor &value); | ||||||||||||||||||
void setValue(const std::vector<int> &indices, float value); | ||||||||||||||||||
void setValue(const std::vector<int> &indices, std::complex<float> value); | ||||||||||||||||||
|
||||||||||||||||||
/// @brief Get the value at a certain entry in the tensor | ||||||||||||||||||
/// @param indices The index of the entry to get | ||||||||||||||||||
[[nodiscard]] Tensor getValue(const std::vector<std::variant<int, std::string>> &indices) const; | ||||||||||||||||||
[[nodiscard]] Tensor getValues(const std::vector<indexType> &indices) const; | ||||||||||||||||||
|
||||||||||||||||||
/// @brief Get the value at a certain entry in the tensor as an std::variant | ||||||||||||||||||
/// @details This mainly exists so we can get the values of a tensor in python as pybind11 DOES NOT like templated | ||||||||||||||||||
/// functions If using the c++ interface it is probably easier, faster and safer to use the templated getValue() | ||||||||||||||||||
/// function. | ||||||||||||||||||
[[nodiscard]] variantType getVariantValue(const std::vector<int> &indices) const; | ||||||||||||||||||
|
||||||||||||||||||
/// @brief Get the number of dimensions in the tensor | ||||||||||||||||||
[[nodiscard]] size_t getNdim() const; | ||||||||||||||||||
|
||||||||||||||||||
/// @brief Get the batch dimension size of the tensor | ||||||||||||||||||
/// @brief Get the size of the batch dimension of the tensor | ||||||||||||||||||
[[nodiscard]] int getBatchDim() const; | ||||||||||||||||||
|
||||||||||||||||||
/// @brief Get the shape of the tensor | ||||||||||||||||||
|
@@ -302,6 +338,8 @@ | |||||||||||||||||
|
||||||||||||||||||
private: | ||||||||||||||||||
bool _hasBatchDim = false; | ||||||||||||||||||
NTdtypes::scalarType _dType; | ||||||||||||||||||
NTdtypes::deviceType _device; | ||||||||||||||||||
|
||||||||||||||||||
// ################################################### | ||||||||||||||||||
// ########## Tensor library specific stuff ########## | ||||||||||||||||||
|
@@ -312,37 +350,84 @@ | |||||||||||||||||
public: | ||||||||||||||||||
/// @brief Get the value at a particular index of the tensor | ||||||||||||||||||
/// @arg indices The indices of the value to set | ||||||||||||||||||
template <typename T> inline T getValue(const std::vector<int> &indices) | ||||||||||||||||||
template <typename T> inline T getValue(const std::vector<int> &indices) const | ||||||||||||||||||
{ | ||||||||||||||||||
NT_PROFILE(); | ||||||||||||||||||
|
||||||||||||||||||
std::vector<at::indexing::TensorIndex> indicesVec; | ||||||||||||||||||
indicesVec.reserve(indices.size()); | ||||||||||||||||||
for (const int &i : indices) | ||||||||||||||||||
{ | ||||||||||||||||||
indicesVec.push_back(at::indexing::TensorIndex(i)); | ||||||||||||||||||
} | ||||||||||||||||||
|
||||||||||||||||||
return _tensor.index(indicesVec).item<T>(); | ||||||||||||||||||
return _tensor.index(convertIndices(indices)).item<T>(); | ||||||||||||||||||
} | ||||||||||||||||||
|
||||||||||||||||||
/// Get the value of a size 0 tensor (scalar) | ||||||||||||||||||
template <typename T> inline T getValue() | ||||||||||||||||||
template <typename T> inline T getValue() const | ||||||||||||||||||
{ | ||||||||||||||||||
|
||||||||||||||||||
NT_PROFILE(); | ||||||||||||||||||
|
||||||||||||||||||
return _tensor.item<T>(); | ||||||||||||||||||
} | ||||||||||||||||||
|
||||||||||||||||||
// return the underlying tensor with type determined by the backend library | ||||||||||||||||||
[[nodiscard]] inline const torch::Tensor &getTensor() const | ||||||||||||||||||
{ | ||||||||||||||||||
|
||||||||||||||||||
NT_PROFILE(); | ||||||||||||||||||
|
||||||||||||||||||
return _tensor; | ||||||||||||||||||
} | ||||||||||||||||||
|
||||||||||||||||||
private: | ||||||||||||||||||
/// Set the underlying tensor, setting the relevant information like _dtype and _device | ||||||||||||||||||
inline void setTensor(torch::Tensor tensor) | ||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. clang-tidy diagnostics
Suggested change
clang-tidy diagnosticnuTens/tensors/torch-tensor.cpp:58:5: warning: [clang-analyzer-optin.cplusplus.UninitializedObject]
Tensor(){};
^
/home/runner/work/nuTens/nuTens/nuTens/tensors/tensor.hpp:342:26: note: uninitialized field 'this->_device'
NTdtypes::deviceType _device;
^
/home/runner/work/nuTens/nuTens/nuTens/tensors/tensor.hpp:341:26: note: uninitialized field 'this->_dType'
NTdtypes::scalarType _dType;
^
/home/runner/work/nuTens/nuTens/nuTens/tensors/torch-tensor.cpp:25:12: note: Calling default constructor for 'Tensor'
Tensor ret;
^
/home/runner/work/nuTens/nuTens/nuTens/tensors/tensor.hpp:58:5: note: 2 uninitialized fields at the end of the constructor call
Tensor(){};
^ clang-tidy diagnosticpython/pyNuTens.cpp:22:1: warning: [cppcoreguidelines-avoid-non-const-global-variables]
PYBIND11_MODULE(pyNuTens, m)
^
/home/runner/.local/lib/python3.10/site-packages/torch/include/pybind11/detail/common.h:392:44: note: expanded from macro 'PYBIND11_MODULE'
static ::pybind11::module_::module_def PYBIND11_CONCAT(pybind11_module_def_, name) \
^
/home/runner/.local/lib/python3.10/site-packages/torch/include/pybind11/detail/common.h:312:40: note: expanded from macro 'PYBIND11_CONCAT'
#define PYBIND11_CONCAT(first, second) first##second
^
note: expanded from here clang-tidy diagnosticpython/pyNuTens.cpp:22:1: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
PYBIND11_MODULE(pyNuTens, m)
^
/home/runner/.local/lib/python3.10/site-packages/torch/include/pybind11/detail/common.h:397:9: note: expanded from macro 'PYBIND11_MODULE'
PYBIND11_CHECK_PYTHON_VERSION \
^
/home/runner/.local/lib/python3.10/site-packages/torch/include/pybind11/detail/common.h:322:17: note: expanded from macro 'PYBIND11_CHECK_PYTHON_VERSION'
|| (runtime_ver[len] >= '0' && runtime_ver[len] <= '9')) { \
^ |
||||||||||||||||||
{ | ||||||||||||||||||
NT_PROFILE(); | ||||||||||||||||||
|
||||||||||||||||||
_tensor = std::move(tensor); | ||||||||||||||||||
_dType = NTdtypes::invScalarTypeMap.at(tensor.scalar_type()); | ||||||||||||||||||
Check warning on line 383 in nuTens/tensors/tensor.hpp GitHub Actions / cpp-linternuTens/tensors/tensor.hpp:383:48 [bugprone-use-after-move]
|
||||||||||||||||||
_device = NTdtypes::invDeviceTypeMap.at(tensor.device().type()); | ||||||||||||||||||
} | ||||||||||||||||||
|
||||||||||||||||||
/// Utility function to convert from a vector of ints to a vector of a10 tensor indices, which is needed for | ||||||||||||||||||
/// accessing values of a tensor. | ||||||||||||||||||
[[nodiscard]] inline std::vector<at::indexing::TensorIndex> convertIndices(const std::vector<int> &indices) const | ||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. clang-tidy diagnostics
Suggested change
clang-tidy diagnosticnuTens/tensors/tensor.hpp:383:48: warning: [bugprone-use-after-move]
_dType = NTdtypes::invScalarTypeMap.at(tensor.scalar_type());
^
/home/runner/work/nuTens/nuTens/nuTens/tensors/tensor.hpp:382:17: note: move occurred here
_tensor = std::move(tensor);
^ clang-tidy diagnosticnuTens/tensors/tensor.hpp:383:48: warning: [clang-analyzer-cplusplus.Move]
_dType = NTdtypes::invScalarTypeMap.at(tensor.scalar_type());
^
/home/runner/work/nuTens/nuTens/nuTens/tensors/tensor.hpp:382:9: note: Object 'tensor' is moved
_tensor = std::move(tensor);
^
/home/runner/work/nuTens/nuTens/nuTens/tensors/tensor.hpp:383:48: note: Method called on moved-from object 'tensor'
_dType = NTdtypes::invScalarTypeMap.at(tensor.scalar_type());
^ clang-tidy diagnosticnuTens/tensors/torch-tensor.cpp:58:5: warning: [clang-analyzer-optin.cplusplus.UninitializedObject]
Tensor(){};
^
/home/runner/work/nuTens/nuTens/nuTens/tensors/tensor.hpp:342:26: note: uninitialized field 'this->_device'
NTdtypes::deviceType _device;
^
/home/runner/work/nuTens/nuTens/nuTens/tensors/tensor.hpp:341:26: note: uninitialized field 'this->_dType'
NTdtypes::scalarType _dType;
^
/home/runner/work/nuTens/nuTens/nuTens/tensors/torch-tensor.cpp:25:12: note: Calling default constructor for 'Tensor'
Tensor ret;
^
/home/runner/work/nuTens/nuTens/nuTens/tensors/tensor.hpp:58:5: note: 2 uninitialized fields at the end of the constructor call
Tensor(){};
^ clang-tidy diagnosticpython/pyNuTens.cpp:22:1: warning: [cppcoreguidelines-avoid-non-const-global-variables]
PYBIND11_MODULE(pyNuTens, m)
^
/home/runner/.local/lib/python3.10/site-packages/torch/include/pybind11/detail/common.h:392:44: note: expanded from macro 'PYBIND11_MODULE'
static ::pybind11::module_::module_def PYBIND11_CONCAT(pybind11_module_def_, name) \
^
/home/runner/.local/lib/python3.10/site-packages/torch/include/pybind11/detail/common.h:312:40: note: expanded from macro 'PYBIND11_CONCAT'
#define PYBIND11_CONCAT(first, second) first##second
^
note: expanded from here clang-tidy diagnosticpython/pyNuTens.cpp:22:1: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
PYBIND11_MODULE(pyNuTens, m)
^
/home/runner/.local/lib/python3.10/site-packages/torch/include/pybind11/detail/common.h:397:9: note: expanded from macro 'PYBIND11_MODULE'
PYBIND11_CHECK_PYTHON_VERSION \
^
/home/runner/.local/lib/python3.10/site-packages/torch/include/pybind11/detail/common.h:322:17: note: expanded from macro 'PYBIND11_CHECK_PYTHON_VERSION'
|| (runtime_ver[len] >= '0' && runtime_ver[len] <= '9')) { \
^ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. clang-tidy diagnostics
Suggested change
|
||||||||||||||||||
{ | ||||||||||||||||||
NT_PROFILE(); | ||||||||||||||||||
|
||||||||||||||||||
std::vector<at::indexing::TensorIndex> indicesVec; | ||||||||||||||||||
indicesVec.reserve(indices.size()); | ||||||||||||||||||
for (const int &i : indices) | ||||||||||||||||||
{ | ||||||||||||||||||
indicesVec.push_back(at::indexing::TensorIndex(i)); | ||||||||||||||||||
} | ||||||||||||||||||
|
||||||||||||||||||
return indicesVec; | ||||||||||||||||||
} | ||||||||||||||||||
|
||||||||||||||||||
/// Utility function to convert from a vector of ints to a vector of a10 tensor indices, which is needed for | ||||||||||||||||||
/// accessing values of a tensor. | ||||||||||||||||||
[[nodiscard]] inline std::vector<at::indexing::TensorIndex> convertIndices( | ||||||||||||||||||
const std::vector<Tensor::indexType> &indices) const | ||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. clang-tidy diagnostics
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. clang-tidy diagnostics
Suggested change
|
||||||||||||||||||
{ | ||||||||||||||||||
NT_PROFILE(); | ||||||||||||||||||
|
||||||||||||||||||
std::vector<at::indexing::TensorIndex> indicesVec; | ||||||||||||||||||
for (const Tensor::indexType &i : indices) | ||||||||||||||||||
{ | ||||||||||||||||||
if (const int *index = std::get_if<int>(&i)) | ||||||||||||||||||
{ | ||||||||||||||||||
indicesVec.push_back(at::indexing::TensorIndex(*index)); | ||||||||||||||||||
} | ||||||||||||||||||
else if (const std::string *index = std::get_if<std::string>(&i)) | ||||||||||||||||||
{ | ||||||||||||||||||
indicesVec.push_back(at::indexing::TensorIndex((*index).c_str())); | ||||||||||||||||||
} | ||||||||||||||||||
else | ||||||||||||||||||
{ | ||||||||||||||||||
assert(false && "ERROR: Unsupported index type"); | ||||||||||||||||||
throw; | ||||||||||||||||||
} | ||||||||||||||||||
} | ||||||||||||||||||
|
||||||||||||||||||
return indicesVec; | ||||||||||||||||||
} | ||||||||||||||||||
|
||||||||||||||||||
private: | ||||||||||||||||||
torch::Tensor _tensor; | ||||||||||||||||||
#endif | ||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy diagnostic
nuTens/propagator/propagator.cpp:45:23: error: [clang-diagnostic-error]
clang-tidy diagnostic
nuTens/propagator/propagator.cpp:45:73: error: [clang-diagnostic-error]
clang-tidy diagnostic
nuTens/propagator/propagator.cpp:45:94: error: [clang-diagnostic-error]
clang-tidy diagnostic
nuTens/propagator/propagator.hpp:42:35: error: [clang-diagnostic-error]
clang-tidy diagnostic
nuTens/propagator/propagator.hpp:42:76: error: [clang-diagnostic-error]
clang-tidy diagnostic
nuTens/propagator/propagator.hpp:42:97: error: [clang-diagnostic-error]
clang-tidy diagnostic
nuTens/propagator/propagator.hpp:45:23: error: [clang-diagnostic-error]
clang-tidy diagnostic
nuTens/propagator/propagator.hpp:45:73: error: [clang-diagnostic-error]
clang-tidy diagnostic
nuTens/propagator/propagator.hpp:45:94: error: [clang-diagnostic-error]
clang-tidy diagnostic
nuTens/tensors/dtypes.hpp:30:14: error: [clang-diagnostic-error]
clang-tidy diagnostic
nuTens/tensors/dtypes.hpp:30:35: error: [clang-diagnostic-error]
clang-tidy diagnostic
nuTens/tensors/dtypes.hpp:30:78: error: [clang-diagnostic-error]
clang-tidy diagnostic
nuTens/tensors/dtypes.hpp:31:79: error: [clang-diagnostic-error]
clang-tidy diagnostic
nuTens/tensors/dtypes.hpp:32:85: error: [clang-diagnostic-error]
clang-tidy diagnostic
nuTens/tensors/dtypes.hpp:33:86: error: [clang-diagnostic-error]
clang-tidy diagnostic
nuTens/tensors/dtypes.hpp:36:14: error: [clang-diagnostic-error]
clang-tidy diagnostic
nuTens/tensors/dtypes.hpp:36:23: error: [clang-diagnostic-error]
clang-tidy diagnostic
nuTens/tensors/dtypes.hpp:36:73: error: [clang-diagnostic-error]
clang-tidy diagnostic
nuTens/tensors/dtypes.hpp:37:73: error: [clang-diagnostic-error]
clang-tidy diagnostic
nuTens/tensors/dtypes.hpp:38:73: error: [clang-diagnostic-error]
clang-tidy diagnostic
nuTens/tensors/dtypes.hpp:39:73: error: [clang-diagnostic-error]
clang-tidy diagnostic
nuTens/tensors/dtypes.hpp:42:14: error: [clang-diagnostic-error]
clang-tidy diagnostic
nuTens/tensors/dtypes.hpp:42:35: error: [clang-diagnostic-error]
clang-tidy diagnostic
nuTens/tensors/dtypes.hpp:42:76: error: [clang-diagnostic-error]
clang-tidy diagnostic
nuTens/tensors/dtypes.hpp:42:97: error: [clang-diagnostic-error]
clang-tidy diagnostic
nuTens/tensors/dtypes.hpp:45:14: error: [clang-diagnostic-error]
clang-tidy diagnostic
nuTens/tensors/dtypes.hpp:45:23: error: [clang-diagnostic-error]
clang-tidy diagnostic
nuTens/tensors/dtypes.hpp:45:73: error: [clang-diagnostic-error]
clang-tidy diagnostic
nuTens/tensors/tensor.hpp:42:35: error: [clang-diagnostic-error]
clang-tidy diagnostic
nuTens/tensors/tensor.hpp:42:76: error: [clang-diagnostic-error]
clang-tidy diagnostic
nuTens/tensors/tensor.hpp:42:97: error: [clang-diagnostic-error]
clang-tidy diagnostic
nuTens/tensors/tensor.hpp:45:23: error: [clang-diagnostic-error]
clang-tidy diagnostic
nuTens/tensors/tensor.hpp:45:73: error: [clang-diagnostic-error]
clang-tidy diagnostic
nuTens/tensors/tensor.hpp:45:94: error: [clang-diagnostic-error]
clang-tidy diagnostic
nuTens/tensors/torch-tensor.cpp:30:35: error: [clang-diagnostic-error]
clang-tidy diagnostic
nuTens/tensors/torch-tensor.cpp:30:78: error: [clang-diagnostic-error]
clang-tidy diagnostic
nuTens/tensors/torch-tensor.cpp:31:79: error: [clang-diagnostic-error]
clang-tidy diagnostic
nuTens/tensors/torch-tensor.cpp:32:85: error: [clang-diagnostic-error]
clang-tidy diagnostic
nuTens/tensors/torch-tensor.cpp:33:86: error: [clang-diagnostic-error]
clang-tidy diagnostic
nuTens/tensors/torch-tensor.cpp:38:73: error: [clang-diagnostic-error]
clang-tidy diagnostic
nuTens/tensors/torch-tensor.cpp:39:73: error: [clang-diagnostic-error]
clang-tidy diagnostic
nuTens/tensors/torch-tensor.cpp:42:35: error: [clang-diagnostic-error]
clang-tidy diagnostic
nuTens/tensors/torch-tensor.cpp:42:76: error: [clang-diagnostic-error]
clang-tidy diagnostic
nuTens/tensors/torch-tensor.cpp:42:97: error: [clang-diagnostic-error]
clang-tidy diagnostic
nuTens/tensors/torch-tensor.cpp:45:23: error: [clang-diagnostic-error]
clang-tidy diagnostic
nuTens/tensors/torch-tensor.cpp:45:73: error: [clang-diagnostic-error]
clang-tidy diagnostic
nuTens/tensors/torch-tensor.cpp:45:94: error: [clang-diagnostic-error]
clang-tidy diagnostic
python/pyNuTens.cpp:22:1: warning: [cppcoreguidelines-avoid-non-const-global-variables]
clang-tidy diagnostic
python/pyNuTens.cpp:22:1: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
clang-tidy diagnostic
tests/tensor-basic.cpp:31:79: error: [clang-diagnostic-error]
clang-tidy diagnostic
tests/tensor-basic.cpp:32:85: error: [clang-diagnostic-error]
clang-tidy diagnostic
tests/tensor-basic.cpp:33:86: error: [clang-diagnostic-error]
clang-tidy diagnostic
tests/tensor-basic.cpp:36:14: error: [clang-diagnostic-error]
clang-tidy diagnostic
tests/tensor-basic.cpp:36:23: error: [clang-diagnostic-error]
clang-tidy diagnostic
tests/tensor-basic.cpp:36:73: error: [clang-diagnostic-error]