From fba89f3269d3dbcf2418e360269a83c6c4719967 Mon Sep 17 00:00:00 2001 From: coreylammie Date: Tue, 21 Sep 2021 06:11:44 +0000 Subject: [PATCH] :art: Enforced Python/C++/CUDA Code Formatting with Black and Clang --- memtorch/cpp/solve_sparse_linear.h | 3 ++- setup.py | 3 +-- tests/test_nonidealities.py | 10 ++++++---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/memtorch/cpp/solve_sparse_linear.h b/memtorch/cpp/solve_sparse_linear.h index 49a59725..f35a05ee 100644 --- a/memtorch/cpp/solve_sparse_linear.h +++ b/memtorch/cpp/solve_sparse_linear.h @@ -2,5 +2,6 @@ #include #include -void solve_sparse_linear(Eigen::SparseMatrix A, double *B_values, int n); +void solve_sparse_linear(Eigen::SparseMatrix A, double *B_values, + int n); void solve_sparse_linear(Eigen::SparseMatrix A, float *B_values, int n); \ No newline at end of file diff --git a/setup.py b/setup.py index 87647deb..c9427b88 100644 --- a/setup.py +++ b/setup.py @@ -22,8 +22,7 @@ def create_version_py(version, CUDA): create_version_py(version, CUDA) if CUDA: - from torch.utils.cpp_extension import (BuildExtension, CppExtension, - CUDAExtension) + from torch.utils.cpp_extension import BuildExtension, CppExtension, CUDAExtension ext_modules = [ CUDAExtension( diff --git a/tests/test_nonidealities.py b/tests/test_nonidealities.py index ef415a4c..c783a386 100644 --- a/tests/test_nonidealities.py +++ b/tests/test_nonidealities.py @@ -7,10 +7,12 @@ import memtorch from memtorch.bh.nonideality.DeviceFaults import apply_cycle_variability -from memtorch.bh.nonideality.endurance_retention_models.conductance_drift import \ - model_conductance_drift -from memtorch.bh.nonideality.endurance_retention_models.empirical_metal_oxide_RRAM import \ - model_endurance_retention +from memtorch.bh.nonideality.endurance_retention_models.conductance_drift import ( + model_conductance_drift, +) +from memtorch.bh.nonideality.endurance_retention_models.empirical_metal_oxide_RRAM import ( + model_endurance_retention, +) from memtorch.bh.nonideality.NonIdeality import apply_nonidealities from memtorch.mn.Module import supported_module_parameters