[Mlir-commits] [mlir] [mlir][sparse][gpu] refine type of workspace size variables (PR #66438)

Aart Bik llvmlistbot at llvm.org
Thu Sep 14 14:53:08 PDT 2023


https://github.com/aartbik created https://github.com/llvm/llvm-project/pull/66438:

Rationale:
Some compiler settings don't like the size_t vs uint64_t setup.

>From 2a3e2f36b8b936f5c41b2bf940b72b69e6639279 Mon Sep 17 00:00:00 2001
From: Aart Bik <ajcbik at google.com>
Date: Thu, 14 Sep 2023 14:31:23 -0700
Subject: [PATCH] [mlir][sparse][gpu] refine type of workspace size variables

Rationale:
Some compiler settings don't like the size_t vs uint64_t setup.
---
 mlir/lib/ExecutionEngine/CudaRuntimeWrappers.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/mlir/lib/ExecutionEngine/CudaRuntimeWrappers.cpp b/mlir/lib/ExecutionEngine/CudaRuntimeWrappers.cpp
index 7bf6804902479a8..8a1417d7750e586 100644
--- a/mlir/lib/ExecutionEngine/CudaRuntimeWrappers.cpp
+++ b/mlir/lib/ExecutionEngine/CudaRuntimeWrappers.cpp
@@ -792,9 +792,9 @@ mgpuCuSparseLtSpMMBufferSize(void *bs, int32_t ma, int32_t mb, void *a, void *b,
   auto matA = reinterpret_cast<cusparseLtSpMatHandleAndData *>(a);
   auto matB = reinterpret_cast<cusparseLtDnMatHandleAndData *>(b);
   auto matC = reinterpret_cast<cusparseLtDnMatHandleAndData *>(c);
-  auto workspace_size = reinterpret_cast<int64_t *>(bs);
-  auto compressed_size = &(reinterpret_cast<int64_t *>(bs)[1]);
-  auto compressed_buffer_size = &(reinterpret_cast<int64_t *>(bs)[2]);
+  auto workspace_size = reinterpret_cast<size_t *>(bs);
+  auto compressed_size = &(reinterpret_cast<size_t *>(bs)[1]);
+  auto compressed_buffer_size = &(reinterpret_cast<size_t *>(bs)[2]);
   auto cTp = static_cast<cusparseComputeType>(ctp);
 
   cusparseOperation_t modeA = static_cast<cusparseOperation_t>(ma);



More information about the Mlir-commits mailing list