Open zhangxaochen opened 5 years ago
forgot to say, the Opt file compute_lighting.t is like:
local N,UUU = Dim('N', 0), Dim('U-SHIT', 1)
local L_coeffs = Unknown("L_coeffs", opt_float9, {UUU}, 0) --写死9
local D_i = Array('D_i', opt_float, {N}, 1)
local Im = Array('Im', opt_float, {N}, 2)
local N_i = Array('N_i', opt_float3, {N}, 3)
--UsePreconditioner(true)
local G = Graph('G', 4,
'd', {N}, 5,
'p', {UUU}, 6
)
local function DepthValid(idx) return greater(D_i(idx),0) end
local n = N_i(G.d)
local x, y, z = n(0), n(1), n(2)
local L = L_coeffs(G.p)
local light = L(0)
+ L(1) * y
+ L(2) * z
+ L(3) * x
+ L(4) * x * y
+ L(5) * y * z
+ L(6) * (2 * z * z - x * x - y * y)
+ L(7) * z * x
+ L(8) * (x * x - y * y)
--Energy(Select(DepthValid(G.d) , light - Im(G.d), 0.0)) --ERR: invalid conversion from bool to float
--Energy(Select( abs(D_i(G.d)-0) , light - Im(G.d), 0.0)) --ERR: cuda 500
Energy(Select( D_i(G.d) , light - Im(G.d), 0.0)) --ERR: cuda 500
--Energy(light - Im(G.d))
Dear author,
I'm trying to compute the albedo map in the example "shape_from_shading", but I get the following error
cuModuleGetFunction: cuda reported error 500
:I tried to ensure the validity of the variables allocated on the GPU, but still get this error... How can I debug this? could someone help me?
my source code snippet is like:
and class CombinedSolverComputeLighting:
and add a setter in struct SFSSolverInput, in SFSSolverInput.h:
and the
computeNmap
is like: