Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
one
spconv
Commits
fc38c00d
Commit
fc38c00d
authored
Oct 19, 2021
by
yan.yan
Browse files
working on file too long problem in windows
parent
9f9d5b79
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
11 deletions
+16
-11
pyproject.toml
pyproject.toml
+1
-1
spconv/csrc/sparse/indices.py
spconv/csrc/sparse/indices.py
+1
-1
spconv/csrc/sparse/maxpool.py
spconv/csrc/sparse/maxpool.py
+8
-8
tools/README.md
tools/README.md
+6
-1
No files found.
pyproject.toml
View file @
fc38c00d
[build-system]
requires
=
[
"setuptools>=41.0"
,
"wheel"
,
"pccm>=0.2.
5
"
,
"cumm>=0.1.
5
"
]
requires
=
[
"setuptools>=41.0"
,
"wheel"
,
"pccm>=0.2.
7
"
,
"cumm>=0.1.
6
"
]
build-backend
=
"setuptools.build_meta"
spconv/csrc/sparse/indices.py
View file @
fc38c00d
...
...
@@ -448,7 +448,7 @@ class SparseConvIndicesKernel(pccm.ParameterizedClass):
int filter_offset = blockIdx.y;
uint32_t filter_mask_out = (1u << (filter_offset));
uint32_t filter_mask_in = (1u << (RS - 1 - filter_offset));
uint32_t filter_mask_center = (1u << (RS / 2));
//
uint32_t filter_mask_center = (1u << (RS / 2));
loc_iter.set_filter_offset(filter_offset);
int indices_pair_size_mul_RS = indices_pair_size * RS;
...
...
spconv/csrc/sparse/maxpool.py
View file @
fc38c00d
...
...
@@ -112,15 +112,15 @@ class IndiceMaxPool(pccm.Class):
bool found = tv::dispatch_int_noexcept<512, 256, 128, 64, 32, 16>(out.dim(1), [](int my, int expect){{return my >= expect;}}, [&](auto V){{
// if out.dim(1) > value in list above, run this function.
// if a value is found, other value won't be executed.
constexpr
int NumFeatures = TV_DECLTYPE(V)::value;
constexpr
int Num0 = MaxThreads / NumFeatures;
int NumFeatures = TV_DECLTYPE(V)::value;
int Num0 = MaxThreads / NumFeatures;
dim3 blocks(tv::div_up(out.dim(1), NumFeatures), tv::div_up(nhot, Num0));
dim3 threads(NumFeatures, Num0);
launcher = tv::cuda::Launch(blocks, threads, cudastream);
}});
if (!found){{
constexpr
int NumFeatures = 16;
constexpr
int Num0 = MaxThreads / NumFeatures;
int NumFeatures = 16;
int Num0 = MaxThreads / NumFeatures;
dim3 blocks(tv::div_up(out.dim(1), NumFeatures), tv::div_up(nhot, Num0));
dim3 threads(NumFeatures, Num0);
launcher = tv::cuda::Launch(blocks, threads, cudastream);
...
...
@@ -154,15 +154,15 @@ class IndiceMaxPool(pccm.Class):
bool found = tv::dispatch_int_noexcept<512, 256, 128, 64, 32, 16>(out.dim(1), [](int my, int expect){{return my >= expect;}}, [&](auto V){{
// if out.dim(1) > value in list above, run this function.
// if a value is found, other value won't be executed.
constexpr
int NumFeatures = TV_DECLTYPE(V)::value;
constexpr
int Num0 = MaxThreads / NumFeatures;
int NumFeatures = TV_DECLTYPE(V)::value;
int Num0 = MaxThreads / NumFeatures;
dim3 blocks(tv::div_up(out.dim(1), NumFeatures), tv::div_up(nhot, Num0));
dim3 threads(NumFeatures, Num0);
launcher = tv::cuda::Launch(blocks, threads, cudastream);
}});
if (!found){{
constexpr
int NumFeatures = 16;
constexpr
int Num0 = MaxThreads / NumFeatures;
int NumFeatures = 16;
int Num0 = MaxThreads / NumFeatures;
dim3 blocks(tv::div_up(out.dim(1), NumFeatures), tv::div_up(nhot, Num0));
dim3 threads(NumFeatures, Num0);
launcher = tv::cuda::Launch(blocks, threads, cudastream);
...
...
tools/README.md
View file @
fc38c00d
...
...
@@ -20,4 +20,9 @@
docker run --rm -it -e PLAT=manylinux2014_x86_64 -v `pwd`:/io -v $HOME:/myhome scrin/manylinux2014-cuda:cu114-devel bash
/io/tools/build-wheels.sh
```
\ No newline at end of file
```
## Windows C++ Tips
*
cuda attributes such as
```__device__```
must put before return type. when you see
```warning: __declspec attributes ignored```
, this means
```__device__```
is ignored because you put it after return type, then cause error.
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