Open3D (C++ API)  0.20.0
Loading...
Searching...
No Matches
GemmSYCL.h
Go to the documentation of this file.
1// ----------------------------------------------------------------------------
2// - Open3D: www.open3d.org -
3// ----------------------------------------------------------------------------
4// Copyright (c) 2018-2026 www.open3d.org
5// SPDX-License-Identifier: MIT
6// ----------------------------------------------------------------------------
7
8// Shared column-major GEMM shim for the SYCL conv ops (ContinuousConv,
9// SparseConv and their Backprop/Transpose variants), used exactly like the
10// CUDA path's `cutlass::gemm::device::Gemm<float, ColumnMajor, ...>`:
11// D = alpha * op(A) * op(B) + beta * C (all matrices ColumnMajor)
12//
13// Declaration only: the sycl-tla (CUTLASS-for-SYCL) template machinery is
14// instantiated once in GemmSYCL.cpp, so the eight conv op translation units
15// that call this do not each recompile a full set of GEMM kernels through
16// both the host and SPIR-V device passes. See GemmSYCL.cpp for the backend
17// design notes (TF32/XMX vs. IEEE fp32 paths, the row/column-major transpose
18// duality used to expose a column-major output, and tile selection).
19#pragma once
20
21#include <cutlass/layout/matrix.h>
22
23#include <cstdint>
24#include <sycl/sycl.hpp>
25#include <vector>
26
27namespace open3d {
28namespace ml {
29namespace impl {
30
68template <class LayoutA = cutlass::layout::ColumnMajor,
69 class LayoutB = cutlass::layout::ColumnMajor>
70sycl::event GemmColumnMajorSYCL(sycl::queue& queue,
71 int m,
72 int n,
73 int k,
74 float alpha,
75 const float* A,
76 int64_t lda,
77 const float* B,
78 int64_t ldb,
79 float beta,
80 float* C,
81 int64_t ldc,
82 bool allow_tf32 = false,
83 const std::vector<sycl::event>& deps = {});
84
85// Explicit instantiation declarations; definitions live in GemmSYCL.cpp.
86extern template sycl::event
88 sycl::queue&,
89 int,
90 int,
91 int,
92 float,
93 const float*,
94 int64_t,
95 const float*,
96 int64_t,
97 float,
98 float*,
99 int64_t,
100 bool,
101 const std::vector<sycl::event>&);
102
103extern template sycl::event
105 sycl::queue&,
106 int,
107 int,
108 int,
109 float,
110 const float*,
111 int64_t,
112 const float*,
113 int64_t,
114 float,
115 float*,
116 int64_t,
117 bool,
118 const std::vector<sycl::event>&);
119
120} // namespace impl
121} // namespace ml
122} // namespace open3d
Eigen::Matrix3d B
Definition PointCloudPlanarPatchDetection.cpp:523
sycl::queue queue
Definition SYCLContext.cpp:88
template sycl::event GemmColumnMajorSYCL< cutlass::layout::ColumnMajor, cutlass::layout::ColumnMajor >(sycl::queue &, int, int, int, float, const float *, int64_t, const float *, int64_t, float, float *, int64_t, bool, const std::vector< sycl::event > &)
template sycl::event GemmColumnMajorSYCL< cutlass::layout::ColumnMajor, cutlass::layout::RowMajor >(sycl::queue &, int, int, int, float, const float *, int64_t, const float *, int64_t, float, float *, int64_t, bool, const std::vector< sycl::event > &)
sycl::event GemmColumnMajorSYCL(sycl::queue &queue, int m, int n, int k, float alpha, const float *A, int64_t lda, const float *B, int64_t ldb, float beta, float *C, int64_t ldc, bool allow_tf32, const std::vector< sycl::event > &deps)
Definition GemmSYCL.cpp:462
Definition PinholeCameraIntrinsic.cpp:16