"vscode:/vscode.git/clone" did not exist on "f2b2310eb4b7034c14e87dca2a61604ea2a0163f"
Unverified Commit a6073f07 authored by Gao, Xiang's avatar Gao, Xiang Committed by GitHub
Browse files

Make ceil_div __host__ __device__ (#2217)

Fixes https://github.com/pytorch/vision/issues/2214#issuecomment-628636663

I don't know why the building is not working with `--expt-relaxed-constexpr` flag set, but it is generally a good idea to declare this as `__host__ __device__`
parent cc4c2af7
...@@ -5,6 +5,6 @@ ...@@ -5,6 +5,6 @@
i += (blockDim.x * gridDim.x)) i += (blockDim.x * gridDim.x))
template <typename integer> template <typename integer>
constexpr inline integer ceil_div(integer n, integer m) { constexpr __host__ __device__ inline integer ceil_div(integer n, integer m) {
return (n + m - 1) / m; return (n + m - 1) / m;
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment