diff --git a/src/record_ts.cpp b/src/record_ts.cpp index a536cb1b..ef7533bf 100644 --- a/src/record_ts.cpp +++ b/src/record_ts.cpp @@ -769,11 +769,8 @@ int Recording::replay_launch(Operation &op) { } // Change kernel size in `kernel_params` - if (backend == JitBackend::CUDA) { - uintptr_t size = 0; - std::memcpy(&size, &launch_size, sizeof(uint32_t)); - kernel_params[0] = (void *) size; - } + if (backend == JitBackend::CUDA) + kernel_params[0] = (void *) (uintptr_t) launch_size; if (!dry_run) { #ifndef NDEBUG @@ -1530,7 +1527,7 @@ void RecordThreadState::record_aggregate(void *dst, AggregationEntry *agg, size); uint32_t start = m_recording.dependencies.size(); - + add_out_param(dst, VarType::UInt8); for (uint32_t i = 0; i < size; ++i) { diff --git a/src/record_ts.h b/src/record_ts.h index c91e0af6..fe3b13b1 100644 --- a/src/record_ts.h +++ b/src/record_ts.h @@ -195,7 +195,7 @@ struct Operation { struct { /// The reduce type of a prefix reduction operation ReduceOp rtype; - + /// Whether a prefix sum operation is exclusive bool exclusive; bool reverse; @@ -450,7 +450,7 @@ struct RecordThreadState : ThreadState { protected: /// Indicates that recording has been paused. bool m_paused = false; - + /// Mapping from data pointer of a variable to a index into the slot of the /// recording. PtrToSlot ptr_to_slot; @@ -556,7 +556,7 @@ struct RecordThreadState : ThreadState { * function will create a new variable and mapping from the pointer to it. */ void notify_free(const void *ptr) override; - + // ============================================================= ~RecordThreadState() {} diff --git a/tests/test.h b/tests/test.h index 4e282874..22f1fd7a 100644 --- a/tests/test.h +++ b/tests/test.h @@ -337,7 +337,7 @@ template class FrozenFunction { return record(input_vector, args...); } else { std::vector output_vector(m_outputs, 0); - + jit_log(LogLevel::Debug, "replay:"); // replay adds borrowing references to the \c output_vector jit_freeze_replay(m_recording, input_vector.data(),