From a547c1182384fc8d4b5fde59b9483c6613c32e7c Mon Sep 17 00:00:00 2001 From: David Dixon <165835255+ellosel@users.noreply.github.com> Date: Mon, 12 Aug 2024 14:25:52 -0600 Subject: [PATCH] Resolve failures on SLES (#2002) --- HostLibraryTests/DecisionTree_test.cpp | 17 +++++++++++------ Tensile/Source/lib/source/llvm/Loading.cpp | 4 ++-- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/HostLibraryTests/DecisionTree_test.cpp b/HostLibraryTests/DecisionTree_test.cpp index b10f4b588a..b38b8db3e1 100644 --- a/HostLibraryTests/DecisionTree_test.cpp +++ b/HostLibraryTests/DecisionTree_test.cpp @@ -2,7 +2,7 @@ * * MIT License * - * Copyright (C) 2022 Advanced Micro Devices, Inc. All rights reserved. + * Copyright (C) 2022-2024 Advanced Micro Devices, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -369,7 +369,12 @@ TEST(DecisionTree, DecisionTreeBatch) using SizeInRange = Predicates::Contraction::SizeInRange; using Range = Predicates::Contraction::Range; using And = Predicates::And; - using BForest = BasicForest; + using DTree4 + = Tree, std::shared_ptr>; + using BForest = BasicForest, std::shared_ptr>; @@ -410,9 +415,9 @@ TEST(DecisionTree, DecisionTreeBatch) features.push_back(boundSize); // Make trees library - std::vector region1trees; + std::vector region1trees; - DTree region1tree0{{ + DTree4 region1tree0{{ {0, 5000.f, IDX_RETURN_FALSE, IDX_RETURN_TRUE}, // YES for freeSizeA > 5000 }}; region1tree0.value = region1Library0; @@ -426,9 +431,9 @@ TEST(DecisionTree, DecisionTreeBatch) region1dtreelib->forest = region1forest; // Make trees library - std::vector region2trees; + std::vector region2trees; - DTree region2tree0{{ + DTree4 region2tree0{{ {0, 5000.f, IDX_RETURN_TRUE, IDX_RETURN_FALSE}, // YES for freeSizeA <= 5000 }}; region2tree0.value = region2Library0; diff --git a/Tensile/Source/lib/source/llvm/Loading.cpp b/Tensile/Source/lib/source/llvm/Loading.cpp index da7157a63b..4ecd7bebea 100644 --- a/Tensile/Source/lib/source/llvm/Loading.cpp +++ b/Tensile/Source/lib/source/llvm/Loading.cpp @@ -2,7 +2,7 @@ * * MIT License * - * Copyright (C) 2019-2022 Advanced Micro Devices, Inc. All rights reserved. + * Copyright (C) 2019-2024 Advanced Micro Devices, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -44,7 +44,7 @@ namespace Tensile try { - auto inputFile = llvm::MemoryBuffer::getFile(filename); + auto inputFile = llvm::MemoryBuffer::getFileAsStream(filename); LibraryIOContext context{filename, preloaded, nullptr}; llvm::yaml::Input yin((*inputFile)->getMemBufferRef(), &context);