@@ -51,7 +51,7 @@ Using ``sycl_extension`` is as straightforward as writing the following ``setup.
5151 import os
5252 import torch
5353 import glob
54- import platform
54+ import platform
5555 from setuptools import find_packages, setup
5656 from torch.utils.cpp_extension import SyclExtension, BuildExtension
5757
@@ -62,15 +62,15 @@ Using ``sycl_extension`` is as straightforward as writing the following ``setup.
6262
6363 if IS_WINDOWS :
6464 cxx_args = [
65- " /O2" ,
66- " /std:c++17" ,
65+ " /O2" ,
66+ " /std:c++17" ,
6767 " /DPy_LIMITED_API=0x03090000" ,
6868 ]
69- sycl_args = [" /O2" , " /std:c++17" ]
69+ sycl_args = [" /O2" , " /std:c++17" ]
7070 else :
7171 cxx_args = [
7272 " -O3" ,
73- " -fdiagnostics-color=always" ,
73+ " -fdiagnostics-color=always" ,
7474 " -DPy_LIMITED_API=0x03090000"
7575 ]
7676 sycl_args = [" -O3" ]
@@ -125,15 +125,15 @@ in a separate ``TORCH_LIBRARY_IMPL`` block:
125125 #include <sycl/sycl.hpp>
126126 #include <ATen/Operators.h>
127127 #include <torch/all.h>
128- #include <torch/library.h>
128+ #include <torch/library.h>
129129
130130
131131 #include <Python.h>
132132
133133 namespace sycl_extension {
134134
135135 // ==========================================================
136- // 1. Kernel
136+ // 1. Kernel
137137 // ==========================================================
138138 static void muladd_kernel(
139139 int numel, const float* a, const float* b, float c, float* result,
@@ -161,7 +161,7 @@ in a separate ``TORCH_LIBRARY_IMPL`` block:
161161 };
162162
163163 // ==========================================================
164- // 2. Wrapper
164+ // 2. Wrapper
165165 // ==========================================================
166166 at::Tensor mymuladd_xpu(const at::Tensor& a, const at::Tensor& b, double c) {
167167 TORCH_CHECK(a.sizes() == b.sizes(), "a and b must have the same shape");
@@ -194,7 +194,7 @@ in a separate ``TORCH_LIBRARY_IMPL`` block:
194194 }
195195
196196 // ==========================================================
197- // 3. Registration
197+ // 3. Registration
198198 // ==========================================================
199199 TORCH_LIBRARY(sycl_extension, m) {
200200 m.def("mymuladd(Tensor a, Tensor b, float c) -> Tensor");
@@ -216,10 +216,10 @@ in a separate ``TORCH_LIBRARY_IMPL`` block:
216216 PyObject* PyInit__C(void) {
217217 static struct PyModuleDef moduledef = {
218218 PyModuleDef_HEAD_INIT,
219- "_C",
220- "XPU Extension Shim",
221- -1,
222- NULL
219+ "_C",
220+ "XPU Extension Shim",
221+ -1,
222+ NULL
223223 };
224224 return PyModule_Create(&moduledef);
225225 }
0 commit comments