Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
torch-spline-conv
Commits
31fc84ff
"...text-generation-inference.git" did not exist on "cef0553d59713a5e5842b9a1d79334d4ffc066b9"
Commit
31fc84ff
authored
Aug 21, 2018
by
rusty1s
Browse files
simplfifications
parent
efc4ab45
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
cuda/basis_kernel.cu
cuda/basis_kernel.cu
+3
-3
cuda/weighting_kernel.cu
cuda/weighting_kernel.cu
+2
-2
No files found.
cuda/basis_kernel.cu
View file @
31fc84ff
...
...
@@ -75,8 +75,8 @@ template <typename scalar_t> struct BasisForward {
b *= v; \
} \
\
BASIS.data[
e * BASIS.sizes[1] + s] = b;
\
WEIGHT_INDEX.data[
e * WEIGHT_INDEX.sizes[1] + s] = wi;
\
BASIS.data[
i] = b;
\
WEIGHT_INDEX.data[
i] = wi;
\
} \
}()
...
...
@@ -210,7 +210,7 @@ template <typename scalar_t> struct BasisBackward {
.data[e * GRAD_BASIS.strides[0] + s * GRAD_BASIS.strides[1]]; \
} \
g *= KERNEL_SIZE[d] - M * IS_OPEN_SPLINE[d]; \
GRAD_PSEUDO.data[
e * GRAD_PSEUDO.sizes[1] + d] = g;
\
GRAD_PSEUDO.data[
i] = g;
\
} \
}()
...
...
cuda/weighting_kernel.cu
View file @
31fc84ff
...
...
@@ -33,7 +33,7 @@ weighting_fw_kernel(at::cuda::detail::TensorInfo<scalar_t, int64_t> out,
v
+=
tmp
;
}
}
out
.
data
[
e
*
out
.
sizes
[
1
]
+
m_out
]
=
v
;
out
.
data
[
i
]
=
v
;
}
}
...
...
@@ -80,7 +80,7 @@ __global__ void weighting_bw_x_kernel(
v
+=
tmp
;
}
}
grad_x
.
data
[
e
*
grad_x
.
sizes
[
1
]
+
m_in
]
=
v
;
grad_x
.
data
[
i
]
=
v
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment