Error message "Stray '[' character" is shown in MEX building through GPU Coder.
조회 수: 3 (최근 30일)
이전 댓글 표시
I'm trying making stereo vision depth estimation tool that uses NVIDIA GPU.
The following function "FulHD_Frame_depth_estimation" is entry-point function in generating CUDA code.
function [ptCloudLocation,ptCloudColor] = FullHD_Frame_depth_estimation(frameLeftRect,frameRightRect,reprojectionMatrix)
% Convert to grayscale.
frameLeftGray = rgb2gray(frameLeftRect);
frameRightGray = rgb2gray(frameRightRect);
% Compute disparity.
disparityMap = disparitySGM(frameLeftGray, frameRightGray);
% Reconstruct 3-D scene.
points3D = reconstructScene(disparityMap, reprojectionMatrix);
points3D = points3D ./ 1000;
ptCloud = pointCloud(points3D, 'Color', frameLeftRect);
ptCloudLocation = ptCloud.Location;
ptCloudColor = ptCloud.Color;
end
And the following function "FullHD_movie_depth_estimation" is entire estimation code that loads stereo movies.
function FullHD_movie_depth_estimation(left_camera_movie_file_name,right_camera_movie_file_name,stereoparams_file_name)
load(stereoparams_file_name);
videoFileLeft = left_camera_movie_file_name;
videoFileRight = right_camera_movie_file_name;
readerLeft = VideoReader(videoFileLeft);
readerRight = VideoReader(videoFileRight);
frameLeft = readFrame(readerLeft);
frameRight = readFrame(readerRight);
[~, ~, reprojectionMatrix] = ...
rectifyStereoImages(frameLeft, frameRight, stereoParams);
%Create a streaming point cloud viewer
player3D = pcplayer([-3, 3], [-3, 3], [0, 8], 'VerticalAxis', 'y', 'VerticalAxisDir', 'down');
%while hasFrame(readerLeft) && hasFrame(readerRight)
for i = 1:1
% Read the frames.
frameLeft = readFrame(readerLeft);
frameRight = readFrame(readerRight);
% Rectify the frames.
[frameLeftRect, frameRightRect] = rectifyStereoImages(frameLeft, frameRight, stereoParams);
[pC.Location,pC.Color] = FullHD_Frame_depth_estimation(frameLeftRect,frameRightRect,reprojectionMatrix);
view(player3D, pC.Location,pC.Color);
end
end
In GPU Coder, MEX of "FullHD_Frame_depth_estimation" failed to be built in using GPU.
[1/18] nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE --no-exceptions -Xcompiler "/EHa" -Xcompiler "/utf-8" -I "." -I "C:\Users\" -I "C:\Program Files\MATLAB\R2023a\extern\include" -I ".\interface" -I "." -DMW_CUDA_ARCH=350 -DMW_GPU_MEMORY_DEBUG -DMODEL=FullHD_Frame_depth_estimation_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2023a/simulink/include" -I "C:\Program Files\MATLAB\R2023a/toolbox/shared/simtargets" gpudisparitySGM_mw_ptx.cu -o build\win64\gpudisparitySGM_mw_ptx.obj
FAILED: build/win64/gpudisparitySGM_mw_ptx.obj
nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE --no-exceptions -Xcompiler "/EHa" -Xcompiler "/utf-8" -I "." -I "C:\Users" -I "C:\Program Files\MATLAB\R2023a\extern\include" -I ".\interface" -I "." -DMW_CUDA_ARCH=350 -DMW_GPU_MEMORY_DEBUG -DMODEL=FullHD_Frame_depth_estimation_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2023a/simulink/include" -I "C:\Program Files\MATLAB\R2023a/toolbox/shared/simtargets" gpudisparitySGM_mw_ptx.cu -o build\win64\gpudisparitySGM_mw_ptx.obj
nvcc fatal : Stray '[' character
[2/18] nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE --no-exceptions -Xcompiler "/EHa" -Xcompiler "/utf-8" -I "." -I "C:\Users" -I "C:\Program Files\MATLAB\R2023a\extern\include" -I ".\interface" -I "." -DMW_CUDA_ARCH=350 -DMW_GPU_MEMORY_DEBUG -DMODEL=FullHD_Frame_depth_estimation_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2023a/simulink/include" -I "C:\Program Files\MATLAB\R2023a/toolbox/shared/simtargets" gpudisparitySGMCost_mw_ptx.cu -o build\win64\gpudisparitySGMCost_mw_ptx.obj
FAILED: build/win64/gpudisparitySGMCost_mw_ptx.obj
nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE --no-exceptions -Xcompiler "/EHa" -Xcompiler "/utf-8" -I "." -I "C:\Users" -I "C:\Program Files\MATLAB\R2023a\extern\include" -I ".\interface" -I "." -DMW_CUDA_ARCH=350 -DMW_GPU_MEMORY_DEBUG -DMODEL=FullHD_Frame_depth_estimation_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2023a/simulink/include" -I "C:\Program Files\MATLAB\R2023a/toolbox/shared/simtargets" gpudisparitySGMCost_mw_ptx.cu -o build\win64\gpudisparitySGMCost_mw_ptx.obj
nvcc fatal : Stray '[' character
[3/18] nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE --no-exceptions -Xcompiler "/EHa" -Xcompiler "/utf-8" -I "." -I "C:\Users" -I "C:\Program Files\MATLAB\R2023a\extern\include" -I ".\interface" -I "." -DMW_CUDA_ARCH=350 -DMW_GPU_MEMORY_DEBUG -DMODEL=FullHD_Frame_depth_estimation_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2023a/simulink/include" -I "C:\Program Files\MATLAB\R2023a/toolbox/shared/simtargets" FullHD_Frame_depth_estimation_initialize.cu -o build\win64\FullHD_Frame_depth_estimation_initialize.obj
FAILED: build/win64/FullHD_Frame_depth_estimation_initialize.obj
nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE --no-exceptions -Xcompiler "/EHa" -Xcompiler "/utf-8" -I "." -I "C:\Users" -I "C:\Program Files\MATLAB\R2023a\extern\include" -I ".\interface" -I "." -DMW_CUDA_ARCH=350 -DMW_GPU_MEMORY_DEBUG -DMODEL=FullHD_Frame_depth_estimation_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2023a/simulink/include" -I "C:\Program Files\MATLAB\R2023a/toolbox/shared/simtargets" FullHD_Frame_depth_estimation_initialize.cu -o build\win64\FullHD_Frame_depth_estimation_initialize.obj
nvcc fatal : Stray '[' character
[4/18] nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE --no-exceptions -Xcompiler "/EHa" -Xcompiler "/utf-8" -I "." -I "C:\Users" -I "C:\Program Files\MATLAB\R2023a\extern\include" -I ".\interface" -I "." -DMW_CUDA_ARCH=350 -DMW_GPU_MEMORY_DEBUG -DMODEL=FullHD_Frame_depth_estimation_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2023a/simulink/include" -I "C:\Program Files\MATLAB\R2023a/toolbox/shared/simtargets" FullHD_Frame_depth_estimation.cu -o build\win64\FullHD_Frame_depth_estimation.obj
FAILED: build/win64/FullHD_Frame_depth_estimation.obj
nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE --no-exceptions -Xcompiler "/EHa" -Xcompiler "/utf-8" -I "." -I "C:\Users" -I "C:\Program Files\MATLAB\R2023a\extern\include" -I ".\interface" -I "." -DMW_CUDA_ARCH=350 -DMW_GPU_MEMORY_DEBUG -DMODEL=FullHD_Frame_depth_estimation_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2023a/simulink/include" -I "C:\Program Files\MATLAB\R2023a/toolbox/shared/simtargets" FullHD_Frame_depth_estimation.cu -o build\win64\FullHD_Frame_depth_estimation.obj
nvcc fatal : Stray '[' character
[5/18] nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE --no-exceptions -Xcompiler "/EHa" -Xcompiler "/utf-8" -I "." -I "C:\User" -I "C:\Program Files\MATLAB\R2023a\extern\include" -I ".\interface" -I "." -DMW_CUDA_ARCH=350 -DMW_GPU_MEMORY_DEBUG -DMODEL=FullHD_Frame_depth_estimation_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2023a/simulink/include" -I "C:\Program Files\MATLAB\R2023a/toolbox/shared/simtargets" disparitySGMWrapperCuda.cpp -o build\win64\disparitySGMWrapperCuda.obj
FAILED: build/win64/disparitySGMWrapperCuda.obj
nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE --no-exceptions -Xcompiler "/EHa" -Xcompiler "/utf-8" -I "." -I "C:\Users" -I "C:\Program Files\MATLAB\R2023a\extern\include" -I ".\interface" -I "." -DMW_CUDA_ARCH=350 -DMW_GPU_MEMORY_DEBUG -DMODEL=FullHD_Frame_depth_estimation_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2023a/simulink/include" -I "C:\Program Files\MATLAB\R2023a/toolbox/shared/simtargets" disparitySGMWrapperCuda.cpp -o build\win64\disparitySGMWrapperCuda.obj
nvcc fatal : Stray '[' character
[6/18] nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE --no-exceptions -Xcompiler "/EHa" -Xcompiler "/utf-8" -I "." -I "C:\Users" -I "C:\Program Files\MATLAB\R2023a\extern\include" -I ".\interface" -I "." -DMW_CUDA_ARCH=350 -DMW_GPU_MEMORY_DEBUG -DMODEL=FullHD_Frame_depth_estimation_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2023a/simulink/include" -I "C:\Program Files\MATLAB\R2023a/toolbox/shared/simtargets" FullHD_Frame_depth_estimation_data.cu -o build\win64\FullHD_Frame_depth_estimation_data.obj
FAILED: build/win64/FullHD_Frame_depth_estimation_data.obj
nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE --no-exceptions -Xcompiler "/EHa" -Xcompiler "/utf-8" -I "." -I "C:\Users" -I "C:\Program Files\MATLAB\R2023a\extern\include" -I ".\interface" -I "." -DMW_CUDA_ARCH=350 -DMW_GPU_MEMORY_DEBUG -DMODEL=FullHD_Frame_depth_estimation_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2023a/simulink/include" -I "C:\Program Files\MATLAB\R2023a/toolbox/shared/simtargets" FullHD_Frame_depth_estimation_data.cu -o build\win64\FullHD_Frame_depth_estimation_data.obj
nvcc fatal : Stray '[' character
[7/18] nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE --no-exceptions -Xcompiler "/EHa" -Xcompiler "/utf-8" -I "." -I "C:\Users" -I "C:\Program Files\MATLAB\R2023a\extern\include" -I ".\interface" -I "." -DMW_CUDA_ARCH=350 -DMW_GPU_MEMORY_DEBUG -DMODEL=FullHD_Frame_depth_estimation_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2023a/simulink/include" -I "C:\Program Files\MATLAB\R2023a/toolbox/shared/simtargets" MWPtxUtils.cpp -o build\win64\MWPtxUtils.obj
FAILED: build/win64/MWPtxUtils.obj
nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE --no-exceptions -Xcompiler "/EHa" -Xcompiler "/utf-8" -I "." -I "C:\Users" -I "C:\Program Files\MATLAB\R2023a\extern\include" -I ".\interface" -I "." -DMW_CUDA_ARCH=350 -DMW_GPU_MEMORY_DEBUG -DMODEL=FullHD_Frame_depth_estimation_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2023a/simulink/include" -I "C:\Program Files\MATLAB\R2023a/toolbox/shared/simtargets" MWPtxUtils.cpp -o build\win64\MWPtxUtils.obj
nvcc fatal : Stray '[' character
[8/18] nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE --no-exceptions -Xcompiler "/EHa" -Xcompiler "/utf-8" -I "." -I "C:\Users" -I "C:\Program Files\MATLAB\R2023a\extern\include" -I ".\interface" -I "." -DMW_CUDA_ARCH=350 -DMW_GPU_MEMORY_DEBUG -DMODEL=FullHD_Frame_depth_estimation_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2023a/simulink/include" -I "C:\Program Files\MATLAB\R2023a/toolbox/shared/simtargets" MWCUBLASUtils.cpp -o build\win64\MWCUBLASUtils.obj
FAILED: build/win64/MWCUBLASUtils.obj
nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE --no-exceptions -Xcompiler "/EHa" -Xcompiler "/utf-8" -I "." -I "C:\Users" -I "C:\Program Files\MATLAB\R2023a\extern\include" -I ".\interface" -I "." -DMW_CUDA_ARCH=350 -DMW_GPU_MEMORY_DEBUG -DMODEL=FullHD_Frame_depth_estimation_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2023a/simulink/include" -I "C:\Program Files\MATLAB\R2023a/toolbox/shared/simtargets" MWCUBLASUtils.cpp -o build\win64\MWCUBLASUtils.obj
nvcc fatal : Stray '[' character
[9/18] nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE --no-exceptions -Xcompiler "/EHa" -Xcompiler "/utf-8" -I "." -I "C:\Users" -I "C:\Program Files\MATLAB\R2023a\extern\include" -I ".\interface" -I "." -DMW_CUDA_ARCH=350 -DMW_GPU_MEMORY_DEBUG -DMODEL=FullHD_Frame_depth_estimation_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2023a/simulink/include" -I "C:\Program Files\MATLAB\R2023a/toolbox/shared/simtargets" handle.cu -o build\win64\handle.obj
FAILED: build/win64/handle.obj
nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE --no-exceptions -Xcompiler "/EHa" -Xcompiler "/utf-8" -I "." -I "C:\Users" -I "C:\Program Files\MATLAB\R2023a\extern\include" -I ".\interface" -I "." -DMW_CUDA_ARCH=350 -DMW_GPU_MEMORY_DEBUG -DMODEL=FullHD_Frame_depth_estimation_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2023a/simulink/include" -I "C:\Program Files\MATLAB\R2023a/toolbox/shared/simtargets" handle.cu -o build\win64\handle.obj
nvcc fatal : Stray '[' character
[10/18] nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE --no-exceptions -Xcompiler "/EHa" -Xcompiler "/utf-8" -I "." -I "C:\Users" -I "C:\Program Files\MATLAB\R2023a\extern\include" -I ".\interface" -I "." -DMW_CUDA_ARCH=350 -DMW_GPU_MEMORY_DEBUG -DMODEL=FullHD_Frame_depth_estimation_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2023a/simulink/include" -I "C:\Program Files\MATLAB\R2023a/toolbox/shared/simtargets" MWErrorCodeUtils.cpp -o build\win64\MWErrorCodeUtils.obj
FAILED: build/win64/MWErrorCodeUtils.obj
nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE --no-exceptions -Xcompiler "/EHa" -Xcompiler "/utf-8" -I "." -I "C:\Users" -I "C:\Program Files\MATLAB\R2023a\extern\include" -I ".\interface" -I "." -DMW_CUDA_ARCH=350 -DMW_GPU_MEMORY_DEBUG -DMODEL=FullHD_Frame_depth_estimation_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2023a/simulink/include" -I "C:\Program Files\MATLAB\R2023a/toolbox/shared/simtargets" MWErrorCodeUtils.cpp -o build\win64\MWErrorCodeUtils.obj
nvcc fatal : Stray '[' character
[11/18] nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE --no-exceptions -Xcompiler "/EHa" -Xcompiler "/utf-8" -I "." -I "C:\Users" -I "C:\Program Files\MATLAB\R2023a\extern\include" -I ".\interface" -I "." -DMW_CUDA_ARCH=350 -DMW_GPU_MEMORY_DEBUG -DMODEL=FullHD_Frame_depth_estimation_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2023a/simulink/include" -I "C:\Program Files\MATLAB\R2023a/toolbox/shared/simtargets" interface\_coder_FullHD_Frame_depth_estimation_mex.cu -o build\win64\_coder_FullHD_Frame_depth_estimation_mex.obj
FAILED: build/win64/_coder_FullHD_Frame_depth_estimation_mex.obj
nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE --no-exceptions -Xcompiler "/EHa" -Xcompiler "/utf-8" -I "." -I "C:\Users" -I "C:\Program Files\MATLAB\R2023a\extern\include" -I ".\interface" -I "." -DMW_CUDA_ARCH=350 -DMW_GPU_MEMORY_DEBUG -DMODEL=FullHD_Frame_depth_estimation_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2023a/simulink/include" -I "C:\Program Files\MATLAB\R2023a/toolbox/shared/simtargets" interface\_coder_FullHD_Frame_depth_estimation_mex.cu -o build\win64\_coder_FullHD_Frame_depth_estimation_mex.obj
nvcc fatal : Stray '[' character
[12/18] nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE --no-exceptions -Xcompiler "/EHa" -Xcompiler "/utf-8" -I "." -I "C:\Users" -I "C:\Program Files\MATLAB\R2023a\extern\include" -I ".\interface" -I "." -DMW_CUDA_ARCH=350 -DMW_GPU_MEMORY_DEBUG -DMODEL=FullHD_Frame_depth_estimation_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2023a/simulink/include" -I "C:\Program Files\MATLAB\R2023a/toolbox/shared/simtargets" FullHD_Frame_depth_estimation_terminate.cu -o build\win64\FullHD_Frame_depth_estimation_terminate.obj
FAILED: build/win64/FullHD_Frame_depth_estimation_terminate.obj
nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE --no-exceptions -Xcompiler "/EHa" -Xcompiler "/utf-8" -I "." -I "C:\Users" -I "C:\Program Files\MATLAB\R2023a\extern\include" -I ".\interface" -I "." -DMW_CUDA_ARCH=350 -DMW_GPU_MEMORY_DEBUG -DMODEL=FullHD_Frame_depth_estimation_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2023a/simulink/include" -I "C:\Program Files\MATLAB\R2023a/toolbox/shared/simtargets" FullHD_Frame_depth_estimation_terminate.cu -o build\win64\FullHD_Frame_depth_estimation_terminate.obj
nvcc fatal : Stray '[' character
[13/18] nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE --no-exceptions -Xcompiler "/EHa" -Xcompiler "/utf-8" -I "." -I "C" -I "C:\Program Files\MATLAB\R2023a\extern\include" -I ".\interface" -I "." -DMW_CUDA_ARCH=350 -DMW_GPU_MEMORY_DEBUG -DMODEL=FullHD_Frame_depth_estimation_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2023a/simulink/include" -I "C:\Program Files\MATLAB\R2023a/toolbox/shared/simtargets" FullHD_Frame_depth_estimation_emxutil.cu -o build\win64\FullHD_Frame_depth_estimation_emxutil.obj
FAILED: build/win64/FullHD_Frame_depth_estimation_emxutil.obj
nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE --no-exceptions -Xcompiler "/EHa" -Xcompiler "/utf-8" -I "." -I "C:\Users" -I "C:\Program Files\MATLAB\R2023a\extern\include" -I ".\interface" -I "." -DMW_CUDA_ARCH=350 -DMW_GPU_MEMORY_DEBUG -DMODEL=FullHD_Frame_depth_estimation_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2023a/simulink/include" -I "C:\Program Files\MATLAB\R2023a/toolbox/shared/simtargets" FullHD_Frame_depth_estimation_emxutil.cu -o build\win64\FullHD_Frame_depth_estimation_emxutil.obj
nvcc fatal : Stray '[' character
[14/18] nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE --no-exceptions -Xcompiler "/EHa" -Xcompiler "/utf-8" -I "." -I "C:\Use" -I "C:\Program Files\MATLAB\R2023a\extern\include" -I ".\interface" -I "." -DMW_CUDA_ARCH=350 -DMW_GPU_MEMORY_DEBUG -DMODEL=FullHD_Frame_depth_estimation_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2023a/simulink/include" -I "C:\Program Files\MATLAB\R2023a/toolbox/shared/simtargets" interface\_coder_FullHD_Frame_depth_estimation_api.cu -o build\win64\_coder_FullHD_Frame_depth_estimation_api.obj
FAILED: build/win64/_coder_FullHD_Frame_depth_estimation_api.obj
nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE --no-exceptions -Xcompiler "/EHa" -Xcompiler "/utf-8" -I "." -I "C:\Users" -I "C:\Program Files\MATLAB\R2023a\extern\include" -I ".\interface" -I "." -DMW_CUDA_ARCH=350 -DMW_GPU_MEMORY_DEBUG -DMODEL=FullHD_Frame_depth_estimation_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2023a/simulink/include" -I "C:\Program Files\MATLAB\R2023a/toolbox/shared/simtargets" interface\_coder_FullHD_Frame_depth_estimation_api.cu -o build\win64\_coder_FullHD_Frame_depth_estimation_api.obj
nvcc fatal : Stray '[' character
[15/18] nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE --no-exceptions -Xcompiler "/EHa" -Xcompiler "/utf-8" -I "." -I "C:\U" -I "C:\Program Files\MATLAB\R2023a\extern\include" -I ".\interface" -I "." -DMW_CUDA_ARCH=350 -DMW_GPU_MEMORY_DEBUG -DMODEL=FullHD_Frame_depth_estimation_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2023a/simulink/include" -I "C:\Program Files\MATLAB\R2023a/toolbox/shared/simtargets" rt_nonfinite.cu -o build\win64\rt_nonfinite.obj
FAILED: build/win64/rt_nonfinite.obj
nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE --no-exceptions -Xcompiler "/EHa" -Xcompiler "/utf-8" -I "." -I "C:\User" -I "C:\Program Files\MATLAB\R2023a\extern\include" -I ".\interface" -I "." -DMW_CUDA_ARCH=350 -DMW_GPU_MEMORY_DEBUG -DMODEL=FullHD_Frame_depth_estimation_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2023a/simulink/include" -I "C:\Program Files\MATLAB\R2023a/toolbox/shared/simtargets" rt_nonfinite.cu -o build\win64\rt_nonfinite.obj
nvcc fatal : Stray '[' character
[16/18] nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE --no-exceptions -Xcompiler "/EHa" -Xcompiler "/utf-8" -I "." -I "C:\" -I "C:\Program Files\MATLAB\R2023a\extern\include" -I ".\interface" -I "." -DMW_CUDA_ARCH=350 -DMW_GPU_MEMORY_DEBUG -DMODEL=FullHD_Frame_depth_estimation_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2023a/simulink/include" -I "C:\Program Files\MATLAB\R2023a/toolbox/shared/simtargets" cpp_mexapi_version.cpp -o build\win64\cpp_mexapi_version.obj
FAILED: build/win64/cpp_mexapi_version.obj
nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE --no-exceptions -Xcompiler "/EHa" -Xcompiler "/utf-8" -I "." -I "C:\Use" -I "C:\Program Files\MATLAB\R2023a\extern\include" -I ".\interface" -I "." -DMW_CUDA_ARCH=350 -DMW_GPU_MEMORY_DEBUG -DMODEL=FullHD_Frame_depth_estimation_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2023a/simulink/include" -I "C:\Program Files\MATLAB\R2023a/toolbox/shared/simtargets" cpp_mexapi_version.cpp -o build\win64\cpp_mexapi_version.obj
nvcc fatal : Stray '[' character
[17/18] cl /c /Zc:__cplusplus /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /DMATLAB_MEX_FILE /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /utf-8 /I "." /I "C:\Users" /I "C:\Program Files\MATLAB\R2023a\extern\include" /I ".\interface" /I "." -DMW_CUDA_ARCH=350 -DMW_GPU_MEMORY_DEBUG -DMODEL=FullHD_Frame_depth_estimation_mex -DMW_NEEDS_VERSION_H interface\_coder_FullHD_Frame_depth_estimation_info.cpp /Fobuild\win64\_coder_FullHD_Frame_depth_estimation_info.obj
_coder_FullHD_Frame_depth_estimation_info.cpp
ninja: build stopped: subcommand failed.
Each error message tells "Stray '[' character." I think generated MEX functions have each grammatical errors. But I have no idea how to solve those errors.
I confirmed each original matlab functions work well without GPU.
My environments are below:
Windows 11
Matlab R2023a
CUDA v11.8
Microsoft Visual C++ 2022
NVIDIA GeForce GT710
Thank you.
댓글 수: 2
Justin Hontz
2023년 6월 30일
Hi Yuya,
It looks like the issue is occurring because nvcc is unable to correctly parse the commands in the makefile rather than a syntax issue with the generated CUDA code. I suspect the issue may involve unsupported characters appearing in the path under which you are generating code. I was able to reproduce the "Stray '[' character" error on my end when I tried generating code within a folder having '[' in the name.
Also, I see different paths appearing for each call to nvcc (e.g. "C:\Use", "C:\Users", "C:\U", "C"). Is this something you manually redacted? If not, this could be a bug with nvcc.
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!