Skip to content

Commit

Permalink
rocAL - Compile failure fix (#1174)
Browse files Browse the repository at this point in the history
  • Loading branch information
kiritigowda authored Aug 21, 2023
1 parent 28a94b5 commit 7ec4739
Show file tree
Hide file tree
Showing 24 changed files with 53 additions and 50 deletions.
2 changes: 1 addition & 1 deletion rocAL/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.5)
project(amd_rocAL)

add_subdirectory(rocAL)
42 changes: 22 additions & 20 deletions rocAL/rocAL/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.5)
project(rocal)

set(CMAKE_CXX_STANDARD 14)
Expand Down Expand Up @@ -51,6 +51,9 @@ if( GPU_SUPPORT AND "${BACKEND}" STREQUAL "HIP")
endif()
list(APPEND CMAKE_PREFIX_PATH ${ROCM_PATH} ${ROCM_PATH}/hip)
set(DEFAULT_AMDGPU_TARGETS "gfx803;gfx900;gfx906;gfx908;gfx90a;gfx940;gfx1030;gfx1031;gfx1032")
if (BUILD_WITH_AMD_ADVANCE)
set(DEFAULT_AMDGPU_TARGETS ${DEFAULT_AMDGPU_TARGETS} "gfx941")
endif()
set(AMDGPU_TARGETS "${DEFAULT_AMDGPU_TARGETS}" CACHE STRING "List of specific machine types for library to target")
find_package(HIP QUIET)
if(HIP_FOUND)
Expand Down Expand Up @@ -172,24 +175,23 @@ if(${BUILD_ROCAL})
../../amd_openvx/openvx/include/
../../amd_openvx_extensions/amd_rpp/include/
../../amd_openvx_extensions/amd_media/include/
./include/api/
./include/augmentations/color_augmentations/
./include/augmentations/effects_augmentations/
./include/augmentations/geometry_augmentations/
./include/augmentations/
./include/decoders/image/
./include/decoders/video/
./include/device/
./include/loaders/
./include/loaders/image/
./include/loaders/video/
./include/meta_data/
./include/parameters/
./include/readers/image/
./include/readers/video/
./include/pipeline/
include
)
include/api/
include/augmentations/color_augmentations/
include/augmentations/effects_augmentations/
include/augmentations/geometry_augmentations/
include/augmentations/
include/decoders/image/
include/decoders/video/
include/device/
include/loaders/
include/loaders/image/
include/loaders/video/
include/meta_data/
include/parameters/
include/pipeline/
include/readers/image/
include/readers/video/
)

if("${BACKEND}" STREQUAL "HIP" AND HIP_FOUND)
link_directories(${HIP_PATH}/lib)
Expand All @@ -202,7 +204,7 @@ if(${BUILD_ROCAL})
protobuf_generate_cpp(CAFFE_PROTO_SRCS CAFFE_PROTO_HEADERS proto/caffe_protos.proto)
link_directories(${AMDRPP_LIBRARIES_DIRS} ${TurboJpeg_LIBRARIES_DIR} ${PROTOBUF_LIBRARY_DIRS} /usr/local/lib/)

file(GLOB_RECURSE SOURCES "./source/*.cpp")
file(GLOB_RECURSE SOURCES "source/*.cpp")
add_library(${PROJECT_NAME} SHARED ${SOURCES} ${TF_PROTO_SRCS} ${TF_PROTO_HEADERS} ${CAFFE_PROTO_HEADERS} ${CAFFE_PROTO_SRCS} ${CAFFE2_PROTO_SRCS} ${CAFFE2_PROTO_HEADERS})

if("${BACKEND}" STREQUAL "HIP" AND HIP_FOUND)
Expand Down
2 changes: 1 addition & 1 deletion rocAL/rocAL/include/loaders/image/loader_module.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ THE SOFTWARE.

#pragma once
#include <memory>
#include "reader.h"
#include "image_reader.h"
#include "decoder.h"
#include "commons.h"
#include "image.h"
Expand Down
2 changes: 1 addition & 1 deletion rocAL/rocAL/include/meta_data/caffe2_meta_data_reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ THE SOFTWARE.
#include "commons.h"
#include "meta_data.h"
#include "meta_data_reader.h"
#include "reader.h"
#include "image_reader.h"

class Caffe2MetaDataReader: public MetaDataReader
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ THE SOFTWARE.
#include "commons.h"
#include "meta_data.h"
#include "meta_data_reader.h"
#include "reader.h"
#include "image_reader.h"

class Caffe2MetaDataReaderDetection: public MetaDataReader
{
Expand Down
4 changes: 2 additions & 2 deletions rocAL/rocAL/include/meta_data/caffe_meta_data_reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ THE SOFTWARE.
#pragma once
#include <map>
#include <dirent.h>
#include <lmdb.h>
#include "commons.h"
#include "meta_data.h"
#include "meta_data_reader.h"
#include "reader.h"
#include <lmdb.h>
#include "image_reader.h"
#include "caffe_protos.pb.h"

class CaffeMetaDataReader: public MetaDataReader
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ THE SOFTWARE.
#include <memory>
#include <list>
#include <variant>
#include <lmdb.h>
#include "commons.h"
#include "meta_data.h"
#include "meta_data_reader.h"
#include "reader.h"
#include "lmdb.h"
#include "image_reader.h"
#include "caffe_protos.pb.h"

class CaffeMetaDataReaderDetection: public MetaDataReader
Expand Down
2 changes: 1 addition & 1 deletion rocAL/rocAL/include/meta_data/mxnet_meta_data_reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ THE SOFTWARE.
#include "commons.h"
#include "meta_data.h"
#include "meta_data_reader.h"
#include "reader.h"
#include "image_reader.h"

class MXNetMetaDataReader: public MetaDataReader
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ THE SOFTWARE.
#include <string>
#include <memory>
#include "randombboxcrop_meta_data.h"
#include "reader.h"
#include "image_reader.h"
#include "meta_data_reader.h"
#include "graph.h"
#include "parameter_factory.h"
Expand Down
4 changes: 2 additions & 2 deletions rocAL/rocAL/include/readers/image/caffe2_lmdb_record_reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ THE SOFTWARE.
#include <map>
#include <iterator>
#include <algorithm>
#include "reader.h"
#include <google/protobuf/message_lite.h>
#include "lmdb.h"
#include <lmdb.h>
#include "image_reader.h"
#include "caffe2_protos.pb.h"
#include "timing_debug.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ THE SOFTWARE.
#include <map>
#include <iterator>
#include <algorithm>
#include "reader.h"
#include <google/protobuf/message_lite.h>
#include <lmdb.h>
#include "image_reader.h"
#include "caffe_protos.pb.h"
#include "timing_debug.h"

Expand Down
2 changes: 1 addition & 1 deletion rocAL/rocAL/include/readers/image/cifar10_data_reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ THE SOFTWARE.
#include <string>
#include <memory>
#include <dirent.h>
#include "reader.h"
#include "image_reader.h"


class CIFAR10DataReader : public Reader {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ THE SOFTWARE.
#include <memory>
#include <fstream>
#include <dirent.h>
#include "reader.h"
#include "image_reader.h"
#include "meta_data_reader.h"
#include "meta_data_graph.h"
#include "timing_debug.h"
Expand Down
2 changes: 1 addition & 1 deletion rocAL/rocAL/include/readers/image/file_source_reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ THE SOFTWARE.
#include <string>
#include <memory>
#include <dirent.h>
#include "reader.h"
#include "image_reader.h"
#include "commons.h"
#include "timing_debug.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ THE SOFTWARE.
#include <map>
#include <vector>
#include <tuple>
#include <lmdb.h>
#include "meta_data_reader.h"

#define CHECK_LMDB_RETURN_STATUS(status) \
Expand Down
2 changes: 1 addition & 1 deletion rocAL/rocAL/include/readers/image/mxnet_recordio_reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ THE SOFTWARE.
#include <iterator>
#include <algorithm>
#include <fstream>
#include "reader.h"
#include "image_reader.h"
#include "timing_debug.h"

class MXNetRecordIOReader : public Reader{
Expand Down
2 changes: 1 addition & 1 deletion rocAL/rocAL/include/readers/image/reader_factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ THE SOFTWARE.
#pragma once

#include <exception>
#include "reader.h"
#include "image_reader.h"

std::shared_ptr<Reader> create_reader(ReaderConfig config);
4 changes: 2 additions & 2 deletions rocAL/rocAL/include/readers/image/tf_record_reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ THE SOFTWARE.
#include <map>
#include <iterator>
#include <algorithm>
#include "reader.h"
#include "timing_debug.h"
#include <google/protobuf/message_lite.h>
#include "image_reader.h"
#include "timing_debug.h"
#include "example.pb.h"
#include "feature.pb.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ THE SOFTWARE.
#include <string>
#include <memory>
#include <dirent.h>
#include "reader.h"
#include "image_reader.h"
#include "commons.h"
#include "timing_debug.h"

Expand Down
6 changes: 3 additions & 3 deletions rocAL/rocAL/source/meta_data/caffe2_meta_data_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/

#include "caffe2_meta_data_reader.h"
#include <iostream>
#include <utility>
#include <algorithm>
#include<fstream>
#include <fstream>
#include <string>
#include <stdint.h>
#include <google/protobuf/message_lite.h>
#include "lmdb.h"
#include <lmdb.h>
#include "caffe2_meta_data_reader.h"
#include "caffe2_protos.pb.h"

using namespace std;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/

#include "caffe2_meta_data_reader_detection.h"
#include <iostream>
#include <utility>
#include <algorithm>
#include <fstream>
#include <string>
#include <stdint.h>
#include <google/protobuf/message_lite.h>
#include "lmdb.h"
#include <lmdb.h>
#include "caffe2_meta_data_reader_detection.h"
#include "caffe2_protos.pb.h"

using namespace std;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/

#include "caffe_meta_data_reader_detection.h"
#include <iostream>
#include <fstream>
#include <utility>
Expand All @@ -29,7 +28,8 @@ THE SOFTWARE.
#include <string>
#include <stdint.h>
#include <google/protobuf/message_lite.h>
#include "lmdb.h"
#include <lmdb.h>
#include "caffe_meta_data_reader_detection.h"
#include "caffe_protos.pb.h"

using namespace std;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ THE SOFTWARE.

#include <cassert>
#include <commons.h>
#include "caffe2_lmdb_record_reader.h"
#include <boost/filesystem.hpp>
#include <boost/algorithm/string.hpp>
#include <iostream>
Expand All @@ -31,6 +30,7 @@ THE SOFTWARE.
#include <sstream>
#include <fstream>
#include <stdint.h>
#include "caffe2_lmdb_record_reader.h"
using namespace std;
namespace filesys = boost::filesystem;

Expand Down
2 changes: 1 addition & 1 deletion rocAL/rocAL_pybind/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

cmake_minimum_required(VERSION 3.4)
cmake_minimum_required(VERSION 3.5)
project(rocAL_pybind)

set(TARGET_NAME rocAL_pybind)
Expand Down

0 comments on commit 7ec4739

Please sign in to comment.