ceed-hip-compile.cpp (20a16a5fde8c37c2820b3798c7dd8f97d46128bb) ceed-hip-compile.cpp (bdcc27286a8034df1dd97bd8aefef85a0efa7b00)
1// Copyright (c) 2017-2025, Lawrence Livermore National Security, LLC and other CEED contributors.
2// All Rights Reserved. See the top-level LICENSE and NOTICE files for details.
3//
4// SPDX-License-Identifier: BSD-2-Clause
5//
6// This file is part of CEED: http://github.com/ceed
7
8#include "ceed-hip-compile.h"

--- 110 unchanged lines hidden (view full) ---

119
120 // Create Program
121 CeedCallHiprtc(ceed, hiprtcCreateProgram(&prog, code.str().c_str(), NULL, 0, NULL, NULL));
122
123 // Compile kernel
124 CeedDebug256(ceed, CEED_DEBUG_COLOR_ERROR, "---------- ATTEMPTING TO COMPILE JIT SOURCE ----------\n");
125 CeedDebug(ceed, "Source:\n%s\n", code.str().c_str());
126 CeedDebug256(ceed, CEED_DEBUG_COLOR_ERROR, "---------- END OF JIT SOURCE ----------\n");
1// Copyright (c) 2017-2025, Lawrence Livermore National Security, LLC and other CEED contributors.
2// All Rights Reserved. See the top-level LICENSE and NOTICE files for details.
3//
4// SPDX-License-Identifier: BSD-2-Clause
5//
6// This file is part of CEED: http://github.com/ceed
7
8#include "ceed-hip-compile.h"

--- 110 unchanged lines hidden (view full) ---

119
120 // Create Program
121 CeedCallHiprtc(ceed, hiprtcCreateProgram(&prog, code.str().c_str(), NULL, 0, NULL, NULL));
122
123 // Compile kernel
124 CeedDebug256(ceed, CEED_DEBUG_COLOR_ERROR, "---------- ATTEMPTING TO COMPILE JIT SOURCE ----------\n");
125 CeedDebug(ceed, "Source:\n%s\n", code.str().c_str());
126 CeedDebug256(ceed, CEED_DEBUG_COLOR_ERROR, "---------- END OF JIT SOURCE ----------\n");
127 if (CeedDebugFlag(ceed)) {
128 // LCOV_EXCL_START
129 CeedDebug256(ceed, CEED_DEBUG_COLOR_ERROR, "---------- JiT COMPILER OPTIONS ----------\n");
130 for (CeedInt i = 0; i < num_opts + num_jit_source_dirs + num_jit_defines; i++) {
131 CeedDebug(ceed, "Option %d: %s", i, opts[i]);
132 }
133 CeedDebug(ceed, "");
134 CeedDebug256(ceed, CEED_DEBUG_COLOR_ERROR, "---------- END OF JiT COMPILER OPTIONS ----------\n");
135 // LCOV_EXCL_STOP
136 }
127 hiprtcResult result = hiprtcCompileProgram(prog, num_opts + num_jit_source_dirs + num_jit_defines, opts);
128
129 for (CeedInt i = 0; i < num_jit_source_dirs; i++) {
130 CeedCallBackend(CeedFree(&opts[num_opts + i]));
131 }
132 for (CeedInt i = 0; i < num_jit_defines; i++) {
133 CeedCallBackend(CeedFree(&opts[num_opts + num_jit_source_dirs + i]));
134 }

--- 109 unchanged lines hidden ---
137 hiprtcResult result = hiprtcCompileProgram(prog, num_opts + num_jit_source_dirs + num_jit_defines, opts);
138
139 for (CeedInt i = 0; i < num_jit_source_dirs; i++) {
140 CeedCallBackend(CeedFree(&opts[num_opts + i]));
141 }
142 for (CeedInt i = 0; i < num_jit_defines; i++) {
143 CeedCallBackend(CeedFree(&opts[num_opts + num_jit_source_dirs + i]));
144 }

--- 109 unchanged lines hidden ---