Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in building #26

Open
zjuzuhe opened this issue Dec 28, 2017 · 4 comments
Open

Error in building #26

zjuzuhe opened this issue Dec 28, 2017 · 4 comments
Assignees

Comments

@zjuzuhe
Copy link

zjuzuhe commented Dec 28, 2017

I'm getting some errors when I'm trying to build the library.And I need some advice.

Environment info

Operating System: Windows 10 x64
Compiler: Visual Studio 14 2015 Win 64/ openblas + CUDA SDK 8.0.44

Error Message

I have used cmake-3.10.1 to obtian the bulid folder.Then I try to bulid the libmxnet.dll. However, I am having difficulties compiling the .sln file.This is the error message part:

2>  Building NVCC (Device) object CMakeFiles/cuda_compile_1.dir/src/ndarray/Release/cuda_compile_1_generated_ndarray_function.cu.obj
2>  ndarray_function.cu
2>d:\python3ex\mxnetyolo\mxnet\dmlc-core\include\dmlc\./optional.h(26): warning : "constexpr" is ignored here in Microsoft mode
2>
2>d:\python3ex\mxnetyolo\mxnet\dmlc-core\include\dmlc\./optional.h(26): warning : "constexpr" is ignored here in Microsoft mode
2>
2>  ndarray_function.cu
2>  Building NVCC (Device) object CMakeFiles/cuda_compile_1.dir/src/operator/Release/cuda_compile_1_generated_activation.cu.obj
2>  activation.cu
2>d:\python3ex\mxnetyolo\mxnet\dmlc-core\include\dmlc\./optional.h(26): warning : "constexpr" is ignored here in Microsoft mode
2>
2>d:\python3ex\mxnetyolo\mxnet\dmlc-core\include\dmlc\./optional.h(26): warning : "constexpr" is ignored here in Microsoft mode
2>
2>  activation.cu
2>  Building NVCC (Device) object CMakeFiles/cuda_compile_1.dir/src/operator/Release/cuda_compile_1_generated_batch_norm.cu.obj
2>  batch_norm.cu
2>d:\python3ex\mxnetyolo\mxnet\dmlc-core\include\dmlc\./optional.h(26): warning : "constexpr" is ignored here in Microsoft mode
2>
2>d:\python3ex\mxnetyolo\mxnet\dmlc-core\include\dmlc\./optional.h(26): warning : "constexpr" is ignored here in Microsoft mode
2>
2>  batch_norm.cu
2>  Building NVCC (Device) object CMakeFiles/cuda_compile_1.dir/src/operator/Release/cuda_compile_1_generated_batch_norm_v1.cu.obj
2>  batch_norm_v1.cu
2>d:\python3ex\mxnetyolo\mxnet\dmlc-core\include\dmlc\./optional.h(26): warning : "constexpr" is ignored here in Microsoft mode

help please.

@zhreshold
Copy link
Owner

please show where error occurs, these are warnings which don't matter.

@zjuzuhe
Copy link
Author

zjuzuhe commented Dec 28, 2017

My apologies.Error like that

1>  yolo_output.cu
1>d:\python3ex\mxnetyolo\mxnet\src\operator\contrib\./yolo_output-inl.h(61): error C2398: conversion from 'double' to 'float' requires a narrowing conversion
1>d:\python3ex\mxnetyolo\mxnet\src\operator\contrib\./yolo_output-inl.h(61): error C2398: conversion from 'double' to 'float' requires a narrowing conversion
1>d:\python3ex\mxnetyolo\mxnet\src\operator\contrib\./yolo_output-inl.h(61): error C2398: conversion from 'double' to 'float' requires a narrowing conversion
1>d:\python3ex\mxnetyolo\mxnet\src\operator\contrib\./yolo_output-inl.h(61): error C2398: conversion from 'double' to 'float' requires a narrowing conversion
1>d:\python3ex\mxnetyolo\mxnet\src\operator\contrib\./yolo_output-inl.h(61): error C2398: conversion from 'double' to 'float' requires a narrowing conversion
1>d:\python3ex\mxnetyolo\mxnet\src\operator\contrib\./yolo_output-inl.h(61): error C2398: conversion from 'double' to 'float' requires a narrowing conversion
1>d:\python3ex\mxnetyolo\mxnet\src\operator\contrib\./yolo_output-inl.h(61): error C2398: conversion from 'double' to 'float' requires a narrowing conversion
1>d:\python3ex\mxnetyolo\mxnet\src\operator\contrib\./yolo_output-inl.h(61): error C2398: conversion from 'double' to 'float' requires a narrowing conversion
1>d:\python3ex\mxnetyolo\mxnet\src\operator\contrib\./yolo_output-inl.h(61): error C2398: conversion from 'double' to 'float' requires a narrowing conversion
1>d:\python3ex\mxnetyolo\mxnet\src\operator\contrib\./yolo_output-inl.h(61): error C2398: conversion from 'double' to 'float' requires a narrowing conversion
1>  CMake Error at cuda_compile_1_generated_yolo_output.cu.obj.Release.cmake:279 (message):
1>    Error generating file
1>    D:/python3ex/mxnetyolo/mxnet/build/CMakeFiles/cuda_compile_1.dir/src/operator/contrib/Release/cuda_compile_1_generated_yolo_output.cu.obj

And the statements in line 61:

    DMLC_DECLARE_FIELD(anchors)
    .set_default({1.08, 1.19, 3.42, 4.41, 6.63, 11.38, 9.42, 5.11, 16.62, 10.52})
    .describe("Predefined anchor box widths and heights.");

@zhreshold
Copy link
Owner

Use

.set_default({1.08f, 1.19f, 3.42f, 4.41f, 6.63f, 11.38f, 9.42f, 5.11f, 16.62f, 10.52f})

for visual studio, I will fix it later.

@zhreshold zhreshold self-assigned this Dec 28, 2017
@zjuzuhe
Copy link
Author

zjuzuhe commented Dec 28, 2017

Thx.I had force it to be float in another way.
It seems to be OK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants