mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-20 06:10:34 +08:00
windows fix
Summary: Attempt to reduce nvcc trouble on windows by (1) avoiding flag for c++14 and (2) avoiding `torch/extension.h`, which introduces pybind11, in `.cu` files. Reviewed By: patricklabatut Differential Revision: D34969868 fbshipit-source-id: f3878d6a2ba9d644e87ae7b6377cb5008b4b6ce3
This commit is contained in:
committed by
Facebook GitHub Bot
parent
e2622d79c0
commit
f2cf9d4d0b
@@ -12,7 +12,6 @@
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "utils/pytorch3d_cutils.h"
|
||||
|
||||
// A chunk of work is blocksize-many points of P1.
|
||||
// The number of potential chunks to do is N*(1+(P1-1)/blocksize)
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
#include <thrust/device_vector.h>
|
||||
#include <thrust/tuple.h>
|
||||
#include "iou_box3d/iou_utils.cuh"
|
||||
#include "utils/pytorch3d_cutils.h"
|
||||
|
||||
// Parallelize over N*M computations which can each be done
|
||||
// independently
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "utils/pytorch3d_cutils.h"
|
||||
#include "utils/warp_reduce.cuh"
|
||||
|
||||
template <unsigned int block_size>
|
||||
@@ -170,6 +169,9 @@ at::Tensor FarthestPointSamplingCuda(
|
||||
// This will ensure each thread processes the minimum necessary number of
|
||||
// points (P/threads).
|
||||
const int points_pow_2 = std::log(static_cast<double>(P)) / std::log(2.0);
|
||||
|
||||
// Max possible threads per block
|
||||
const int MAX_THREADS_PER_BLOCK = 1024;
|
||||
const size_t threads = max(min(1 << points_pow_2, MAX_THREADS_PER_BLOCK), 1);
|
||||
|
||||
// Create the accessors
|
||||
|
||||
@@ -15,6 +15,3 @@
|
||||
#define CHECK_CONTIGUOUS_CUDA(x) \
|
||||
CHECK_CUDA(x); \
|
||||
CHECK_CONTIGUOUS(x)
|
||||
|
||||
// Max possible threads per block
|
||||
const int MAX_THREADS_PER_BLOCK = 1024;
|
||||
|
||||
Reference in New Issue
Block a user