Skip to content

Commit

Permalink
MATX_EN_CUTENSOR / MATX_ENABLE_CUTENSOR Unified Variable (#720)
Browse files Browse the repository at this point in the history
unified cutensor variables for macros and cmake
  • Loading branch information
tylera-nvidia committed Aug 19, 2024
1 parent f55bcd3 commit 15c7e82
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ if (MATX_EN_CUTENSOR)

include(cmake/FindcuTENSOR.cmake)
include(cmake/FindcuTensorNet.cmake)
target_compile_definitions(matx INTERFACE MATX_ENABLE_CUTENSOR)
target_compile_definitions(matx INTERFACE MATX_EN_CUTENSOR)

target_link_libraries(matx INTERFACE cuTENSOR::cuTENSOR)
target_link_libraries(matx INTERFACE cuTensorNet::cuTensorNet)
Expand Down
2 changes: 1 addition & 1 deletion bench/00_transform/einsum.cu
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <nvbench/nvbench.cuh>
#include "matx.h"

#if ENABLE_CUTENSOR
#ifdef MATX_EN_CUTENSOR

using namespace matx;

Expand Down
6 changes: 3 additions & 3 deletions include/matx/transforms/einsum.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

#pragma once

#ifdef MATX_ENABLE_CUTENSOR
#ifdef MATX_EN_CUTENSOR
#include <cstdio>
#include <numeric>
#include "error.h"
Expand Down Expand Up @@ -486,7 +486,7 @@ namespace cutensor {
template <typename OutputType, typename... InT>
void einsum_impl([[maybe_unused]] OutputType &out, [[maybe_unused]] const std::string &subscripts, [[maybe_unused]] cudaStream_t stream, [[maybe_unused]] InT... tensors)
{
#ifdef MATX_ENABLE_CUTENSOR
#ifdef MATX_EN_CUTENSOR
MATX_NVTX_START("", matx::MATX_NVTX_LOG_API)

// Get parameters required by these tensors
Expand All @@ -507,7 +507,7 @@ namespace cutensor {
}
);
#else
MATX_THROW(matxNotSupported, "einsum() currently requires MATX_ENABLE_CUTENSOR=ON but MATX_ENABLE_CUTENSOR=OFF");
MATX_THROW(matxNotSupported, "einsum() currently requires MATX_EN_CUTENSOR=ON but MATX_EN_CUTENSOR=OFF");
#endif
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/00_tensor/EinsumTests.cu
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ TYPED_TEST_SUITE(EinsumTestsIntegral, MatXAllIntegralTypesCUDAExec);
TYPED_TEST_SUITE(EinsumTestsNumericNonComplex, MatXNumericNonComplexTypesCUDAExec);
TYPED_TEST_SUITE(EinsumTestsBoolean, MatXBoolTypesCUDAExec);

#if MATX_ENABLE_CUTENSOR
#if MATX_EN_CUTENSOR
TYPED_TEST(EinsumTestsFloatNonComplexNonHalfTypes, Contraction3D)
{
MATX_ENTER_HANDLER();
Expand Down

0 comments on commit 15c7e82

Please sign in to comment.