Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

MXNet Build Failure with DEV=1 #8305

@eric-haibin-lin

Description

@eric-haibin-lin

Note: Providing complete information in the most concise form is the best way to get help. This issue template serves as the checklist for essential information to most of the technical issues.

If the issue is non-technical, feel free to present the information in what you believe is the best form.

Description

(Brief description of the problem in no more than 2 sentences.)

Environment info (Required)

DL AMI Ubuntu

What to do:
1. Download the diagnosis script from https://raw.githubusercontent.com/apache/incubator-mxnet/master/tools/diagnose.py
2. Run the script using `python diagnose.py` and paste its output here.

Package used (Python/R/Scala/Julia): fg

(I'm using ...)

For Scala user, please provide:

  1. Java version: (java -version)
  2. Maven version: (mvn -version)
  3. Scala runtime if applicable: (scala -version)

For R user, please provide R sessionInfo():

Build info (Required if built from source)

Compiler (gcc/clang/mingw/visual studio):

MXNet commit hash:
(Paste the output of git rev-parse HEAD here.) 65b2587

Build config:
(Paste the content of config.mk, or the build command.)

export CC = gcc
export CXX = g++
export NVCC = nvcc

# whether compile with options for MXNet developer
DEV = 0

# whether compile with debug
DEBUG = 0

# whether compiler with profiler
USE_PROFILER =1

# the additional link flags you want to add
ADD_LDFLAGS =

# the additional compile flags you want to add
ADD_CFLAGS =
# whether use CUDA during compile
USE_CUDA = 0

# add the path to CUDA library to link and compile flag
# if you have already add them to environment variable, leave it as NONE
# USE_CUDA_PATH = /usr/local/cuda
USE_CUDA_PATH = NONE

# whether use CuDNN R3 library
USE_CUDNN = 0

# whether use cuda runtime compiling for writing kernels in native language (i.e. Python)
USE_NVRTC = 0

# whether use opencv during compilation
# you can disable it, however, you will not able to use
# imbin iterator
USE_OPENCV = 1

# use openmp for parallelization
USE_OPENMP = 1
# whether use NNPACK library
USE_NNPACK = 0

# choose the version of blas you want to use
# can be: mkl, blas, atlas, openblas
# in default use atlas for linux while apple for osx
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S), Darwin)
USE_BLAS = apple
else
USE_BLAS = atlas
endif

# add path to intel library, you may need it for MKL, if you did not add the path
# to environment variable
USE_INTEL_PATH = NONE

# If use MKL only for BLAS, choose static link automatically to allow python wrapper
ifeq ($(USE_MKL2017), 0)
ifeq ($(USE_BLAS), mkl)
USE_STATIC_MKL = 1
endif
else
USE_STATIC_MKL = NONE
endif

#----------------------------
# Settings for power and arm arch
#----------------------------
ARCH := $(shell uname -a)
ifneq (,$(filter $(ARCH), armv6l armv7l powerpc64le ppc64le aarch64))
        USE_SSE=0
else
        USE_SSE=1
endif
USE_BLAS=openblas
ADD_CFLAGS += -I/usr/include/openblas

Error Message:

(Paste the complete error message, including stack trace.)

src/io/iter_image_recordio_2.cc: In function ‘<built-in>’:
src/io/iter_image_recordio_2.cc:575:9: error: ‘contrast_scaled’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
         ProcessImage<4>(res, &data, is_mirrored, contrast_scaled, illumination_scaled);
         ^
src/io/iter_image_recordio_2.cc:558:13: note: ‘contrast_scaled’ was declared here
       float contrast_scaled;
             ^
src/io/iter_image_recordio_2.cc:575:9: error: ‘illumination_scaled’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
         ProcessImage<4>(res, &data, is_mirrored, contrast_scaled, illumination_scaled);
         ^
src/io/iter_image_recordio_2.cc:559:13: note: ‘illumination_scaled’ was declared here
       float illumination_scaled;

src/io/iter_image_recordio_2.cc: In member function ‘void mxnet::io::ImageRecordIOParser2<DType>::ProcessImage(const cv::Mat&, mshadow::Tensor<mshadow::cpu, 3, DType>*, bool, float,
 float) [with int n_channels = 1; DType = float]’:
src/io/iter_image_recordio_2.cc:409:13: error: ‘RGBA_MEAN[0]’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
             RGBA[k] = (RGBA[k] - RGBA_MEAN[k]) * RGBA_MULT[k] + RGBA_BIAS[k];

Minimum reproducible example

(If you are using your own code, please provide a short script that reproduces the error. Otherwise, please provide link to the existing example.)

Steps to reproduce

(Paste the commands you ran that produced the error.)

  1. build with DEV=1 in config.mk

What have you tried to solve it?

  1. build with DEV=1 passes for commit ffa6e45
    @ptrendx seems this is introduced by [WIP] New faster version of the RecordIO iterator #7152

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions