Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions projects/hipblaslt/tensilelite/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ set(TENSILELITE_HOST_SOURCES
)
set(TENSILELITE_HOST_MSGPACK_SOURCES
"${CMAKE_CURRENT_LIST_DIR}/src/msgpack/MessagePack.cpp"
"${CMAKE_CURRENT_LIST_DIR}/src/msgpack/SolutionState.cpp"
"${CMAKE_CURRENT_LIST_DIR}/src/msgpack/Writing.cpp"
)

Expand Down
2 changes: 2 additions & 0 deletions projects/hipblaslt/tensilelite/include/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ target_sources(tensilelite-host
"${CMAKE_CURRENT_SOURCE_DIR}/Tensile/AMDGPUPredicates.hpp"
"${CMAKE_CURRENT_SOURCE_DIR}/Tensile/AMDGPU_Detail.hpp"
"${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Activation.hpp"
"${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Architectures.hpp"
"${CMAKE_CURRENT_SOURCE_DIR}/Tensile/CachingLibrary.hpp"
"${CMAKE_CURRENT_SOURCE_DIR}/Tensile/Comparison.hpp"
"${CMAKE_CURRENT_SOURCE_DIR}/Tensile/ContractionLibrary.hpp"
Expand Down Expand Up @@ -124,6 +125,7 @@ else()
FILE_SET tensilelite_public_headers TYPE HEADERS
FILES
"${CMAKE_CURRENT_SOURCE_DIR}/Tensile/msgpack/MessagePack.hpp"
"${CMAKE_CURRENT_SOURCE_DIR}/Tensile/msgpack/SolutionState.hpp"
PRIVATE
FILE_SET tensilelite_private_headers TYPE HEADERS
FILES
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Copyright Advanced Micro Devices, Inc., or its affiliates.
// SPDX-License-Identifier: MIT

#pragma once

#include <array>
#include <string_view>

namespace TensileLite
{
// PCI device ids of the GPUs TensileLite builds libraries for, one list for
// every C++ caller. SUPPORTED_BUILD_CHIP_IDS in
// tensilelite/Common/Architectures.py is the source of the values; the
// catalog tests (test_solution_state_catalog.py and
// SolutionRecord.CatalogMatchesSolutionState) fail when the two lists
// differ.
inline constexpr std::array<std::string_view, 14> SupportedBuildChipIds = {"74a0",
"74a1",
"74a2",
"74a3",
"74a5",
"74a9",
"75a0",
"75b0",
"75a2",
"75b2",
"75a3",
"75b3",
"75a8",
"75b8"};
} // namespace TensileLite
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// Copyright Advanced Micro Devices, Inc., or its affiliates.
// SPDX-License-Identifier: MIT

#pragma once

#include <cstdint>
#include <memory>
#include <string>
#include <vector>

#include <msgpack.hpp>

#include <Tensile/ContractionSolution_fwd.hpp>

#include <tensilelitehost/export.h>

namespace TensileLite
{
// The static catalogs that SolutionState.cpp accepts when it rebuilds a
// record from state.
TENSILELITEHOST_EXPORT std::vector<std::string> supportedBuildChipIds();
TENSILELITEHOST_EXPORT std::vector<std::string> supportedDataTypeNames();

/**
* Builds the library record of one fully derived solution state, the map
* Solution.FromOriginalState receives after defaults and derived parameters
* are filled in.
*
* The input is not a raw custom.config delta and not an unexpanded logic
* entry. It must already contain ProblemType.TotalIndices,
* IndicesSummation, IndicesFree, IndicesBatch, IndexAssignmentsA,
* IndexAssignmentsB, and the other derived fields the record reads. A
* metadata note may carry that derived map. A caller that passes an
* unexpanded map gets a missing-key error.
*
* The assembler types each scalar of a metadata note from its YAML text,
* so an empty string arrives as 0.0 and a null as the string "null"; both
* are read as the values the state holds.
*
* WorkgroupMappingXCCCheck stores only its value. Its compute-unit count
* stays 0 until the predicate is evaluated, which is when the device is
* read. Building the record does not query a GPU.
*
* Throws std::runtime_error naming the key when a key the record needs is
* missing or holds a value of the wrong kind.
*/
TENSILELITEHOST_EXPORT std::shared_ptr<ContractionSolution>
solutionFromState(msgpack::object const& state);
}
Loading
Loading